public async Task Update(CreateUpdateBookDto input, Guid id) { var book = _bookRepository .Where(p => p.Id == id).FirstOrDefault(); book.Name = input.Name; book.Type = input.Type; book.PublishDate = input.PublishDate; book.Price = input.Price; await _bookRepository.UpdateAsync(book); }
public async Task Create(CreateUpdateBookDto input) { var book = new Book(GuidGenerator.Create(), input.Name, input.Type, input.PublishDate, input.Price); await _bookRepository.InsertAsync(book); }