public async Task <GetByIdBookView> GetById(int id) { var book = await _bookrepository.GetById(id); var result = new GetByIdBookView(); result.Id = book.Id; result.Title = book.Title; result.Price = book.Price; return(result); }
public async Task <GetByIdBookView> GetById(Guid id) { var book = await _bookRepository.GetById(id); var model = new GetByIdBookView() { Id = book.Id, Author = book.Author, Name = book.Name, Price = book.Price }; return(model); }