コード例 #1
0
        public Mealvite Insert(Mealvite entity)
        {
            this.ctx.Mealvites.Add(entity);
            this.Save();

            return entity;
        }
コード例 #2
0
        public Mealvite Update(Mealvite entity)
        {
            this.ctx.Entry(entity).State = System.Data.Entity.EntityState.Modified;
            this.Save();

            return entity;
        }
コード例 #3
0
        public IHttpActionResult Update(Mealvite entity)
        {
            try
            {
                this.repo.Update(entity);

                return Ok();
            }
            catch (Exception ex)
            {

                return InternalServerError(ex);
            }
        }