using ServiceStationContracts.BindingModels; using ServiceStationContracts.BusinessLogicContracts; using ServiceStationContracts.SearchModels; using ServiceStationContracts.ViewModels; using ServiceStationsContracts.StorageContracts; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ServiceSourceBusinessLogic.BusinessLogic { public class ReportWork : IReportWorkLogic { private readonly IWorkStorage _storage; public ReportWork(IWorkStorage storage) { _storage = storage; } public List GetWorks(ReportWorkBindingModel model) { return _storage.GetFilteredList(new WorkSearchModel { Date = model.Date }).Select(x => new ReportWorkViewModel { Id = x.Id, Date = x.Date, price = x.Price, WorkStatus = x.Status.ToString(), }).ToList(); } } }