How can I condense a case class with ~20 constructor arguments into 5 or 6 arguments in Scala?
Let’s say I have a case class with ~20 constructor arguments? This is obviously very clunky to type. What would be the best way to condense these arguments into maybe 5 or 6 arguments? There are some arguments that are related to each other enough that I could see doing:
Multiple method calls in the constructor and dependency injection
I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture.
Multiple method calls in the constructor and dependency injection
I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture.
Multiple method calls in the constructor and dependency injection
I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture.
Multiple method calls in the constructor and dependency injection
I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture.
Multiple method calls in the constructor and dependency injection
I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture.
C# Constructor and private LINQ to SQL members
I am extending an application I have developed so that it is more broadly useful for multiple jobs, rather than the single job I created it for. There are a number of tables that I get from SQL Server with LINQ to SQL. Instead of having all records from the database populate the application, I want to filter first by job. Currently my viewmodels all have the same construction: a set of private ObservableCollections that get the data through the LINQ to SQL classes, a constructor that sets up binding commands (trying to practice good MVVM), and then the logic. So what I do now is something like this:
C# Constructor and private LINQ to SQL members
I am extending an application I have developed so that it is more broadly useful for multiple jobs, rather than the single job I created it for. There are a number of tables that I get from SQL Server with LINQ to SQL. Instead of having all records from the database populate the application, I want to filter first by job. Currently my viewmodels all have the same construction: a set of private ObservableCollections that get the data through the LINQ to SQL classes, a constructor that sets up binding commands (trying to practice good MVVM), and then the logic. So what I do now is something like this:
C# Constructor and private LINQ to SQL members
I am extending an application I have developed so that it is more broadly useful for multiple jobs, rather than the single job I created it for. There are a number of tables that I get from SQL Server with LINQ to SQL. Instead of having all records from the database populate the application, I want to filter first by job. Currently my viewmodels all have the same construction: a set of private ObservableCollections that get the data through the LINQ to SQL classes, a constructor that sets up binding commands (trying to practice good MVVM), and then the logic. So what I do now is something like this:
C# Constructor and private LINQ to SQL members
I am extending an application I have developed so that it is more broadly useful for multiple jobs, rather than the single job I created it for. There are a number of tables that I get from SQL Server with LINQ to SQL. Instead of having all records from the database populate the application, I want to filter first by job. Currently my viewmodels all have the same construction: a set of private ObservableCollections that get the data through the LINQ to SQL classes, a constructor that sets up binding commands (trying to practice good MVVM), and then the logic. So what I do now is something like this: