コード例 #1
0
        public async Task <int> Return([FromBody] BookUserViewModel model)
        {
            var mapped     = _mapper.Map <BookUserViewModel, BookUserModel>(model);
            var isReturned = await _repository.ReturnOrderOrReceive(mapped);

            return(isReturned);
        }
コード例 #2
0
        public async Task <int> MakeOrder([FromBody] BookUserViewModel model)
        {
            var mapped  = _mapper.Map <BookUserViewModel, BookUserModel>(model);
            var isSaved = await _repository.Order(mapped);

            return(isSaved);
        }