// GET api/values public IEnumerable <AgreementView> Get() { var items = repository.GetAll(); return(items.Select(item => new AgreementView() { Id = item.Id, Name = item.Name, Number = item.Number, BegDate = item.BeginDate, EndDate = item.EndDate })); }
public Task <IEnumerable <AgreementResponse> > GetAll() => _agreementRepository.GetAll();