コード例 #1
0
ファイル: RentController.cs プロジェクト: Rafles29/RentMyCar
        public IActionResult DeleteRent(int id)
        {
            var userName = User.Identity.Name;
            var rent     = _repo.GetRent(userName, id);

            if (rent == null)
            {
                return(NotFound());
            }
            _repo.DeleteRent(userName, id);
            return(NoContent());
        }
コード例 #2
0
 public bool DeleteRent(int id)
 {
     return(rentRepository.DeleteRent(id));
 }