Пример #1
0
        public async Task <Guid> Create(SheetRequest sheetRequest)
        {
            var sheet = SheetAggregate.CreateFromSheetRequest(sheetRequest);

            await _sheetRepo.Add(sheet);

            return(sheet.Id);
        }
Пример #2
0
        public async Task <Guid> Create(SheetCreateRequest request)
        {
            var sheet = SheetAggregate.CreateFromRequest(request);

            await _repo.Add(sheet);

            return(sheet.Id);
        }
Пример #3
0
        public async Task <Guid> Create(SheetRequest sheetRequest)
        {
            var sheet = new Sheet
            {
                Id         = Guid.NewGuid(),
                Amount     = sheetRequest.Amount,
                ContractId = sheetRequest.ContractId,
                Date       = sheetRequest.Date,
                EmployeeId = sheetRequest.EmployeeId,
                ServiceId  = sheetRequest.ServiceId
            };

            await _sheetRepo.Add(sheet);

            return(sheet.Id);
        }