public static DAL.App.DTO.ProductForClient MapFromBLL(BLL.App.DTO.ProductForClient productForClient) { var res = productForClient == null ? null : new DAL.App.DTO.ProductForClient { Id = productForClient.Id, Client = ClientMapper.MapFromBLL(productForClient.Client), ClientId = productForClient.ClientId, Product = ProductMapper.MapFromBLL(productForClient.Product), ProductId = productForClient.ProductId, Count = 1, // ProductServices = productForClient.ProductServices.Select(e => ProductServiceMapper.MapFromBLL(e)).ToList(), }; return(res); }
public static DAL.App.DTO.WorkObject MapFromBLL(BLL.App.DTO.WorkObject workObject) { var res = workObject == null ? null : new DAL.App.DTO.WorkObject { Id = workObject.Id, Client = ClientMapper.MapFromBLL(workObject.Client), ClientId = workObject.ClientId, From = workObject.From, Until = workObject.Until, // AppUsersOnObject = workObject.AppUsersOnObject.Select(e => AppUserOnObjectMapper.MapFromBLL(e)).ToList(), // ProductsServices = workObject.ProductsServices.Select(e => ProductServiceMapper.MapFromBLL(e)).ToList(), // Bills = workObject.Bills.Select(e => BillMapper.MapFromBLL(e)).ToList(), }; return(res); }