Good day. I have a large project on MVVM Light. The database-first approach on the Entity Framework is used. There is a class DataService. There are 5809 lines in this file! I want to fix this somehow. Will it be good if I divide the DataService into several different services? Maybe it is worth looking in the direction of the Repository or UnitOfWork patterns, but you have heard that they are rather meaningless with EF. Unfortunately, there are no cool uncles of developers in our organization, so there is no one to tell.
DataService - a service to access data from the database. Uses EF. I give for example one relevant method in the DataService.
public firma GetFirmById(int id_firm, params string[] includes) { using (var clientEntities = new ClientEntities(Application.Current.Properties["connectionStringForClient"].ToString(), false)) { DbQuery<firma> query = clientEntities.firms; foreach (var include in includes) query = query.Include(include); return query.First(f => f.id_firm == id_firm); } }