コード例 #1
0
        public IActionResult Create(MoviePremier moviePremier)
        {
            if (!UserIsInRole(UserTypeEnum.Admin))
            {
                return(Unauthorized("You are not in role to permit this action"));
            }

            _service.Insert(moviePremier);
            return(Ok(moviePremier));
        }
コード例 #2
0
 public bool Update(MoviePremier moviePremier)
 {
     _repository.Update(moviePremier);
     return(_repository.SaveChanges());
 }
コード例 #3
0
 public bool Insert(MoviePremier moviePremier)
 {
     _repository.Create(moviePremier);
     return(_repository.SaveChanges());
 }