public Order_ReceiptBook Create(Order_ReceiptBookCreateDto dto) { var entity = new Order_ReceiptBook { BookId = dto.BookId, Order_ReceiptId = dto.Order_ReceiptId }; return(repository.Add(entity)); }
public Order_ReceiptBook Update(Order_ReceiptBookUpdateDto dto) { // var isExist = GetDetail(dto.Name); // if (isExist != null && dto.Id != isExist.Id) // { // throw new Exception(dto.Name + " existed"); // } var entity = new Order_ReceiptBook { Id = dto.Id, BookId = dto.BookId, Order_ReceiptId = dto.Order_ReceiptId }; return(repository.Update(entity)); }