public async Task <int> Return([FromBody] BookUserViewModel model) { var mapped = _mapper.Map <BookUserViewModel, BookUserModel>(model); var isReturned = await _repository.ReturnOrderOrReceive(mapped); return(isReturned); }
public async Task <int> MakeOrder([FromBody] BookUserViewModel model) { var mapped = _mapper.Map <BookUserViewModel, BookUserModel>(model); var isSaved = await _repository.Order(mapped); return(isSaved); }