public void Update(YedigiBesin entity)
 {
     using (var context = new DatabaseContext())
     {
         context.Set <YedigiBesin>().Update(entity);
         context.SaveChanges();
     }
 }
예제 #2
0
        public ActionResult GetUser(YedigiBesin model)
        {
            var user  = _userService.GetById(model.UsersId);
            var besin = _besinlerService.GetById(model.BesinlerId);

            if (user != null && besin != null)
            {
                _yedigi.create(model);
                return(Ok("Eklendi"));
            }
            else
            {
                return(Ok("Boyle bir kullanici yada besin yok"));
            }
        }