Пример #1
0
        public Profile Insert(Profile entity)
        {
            this.ctx.Profiles.Add(entity);
            this.Save();

            return entity;
        }
Пример #2
0
        public Profile Update(Profile entity)
        {
            this.ctx.Entry(entity).State = System.Data.Entity.EntityState.Modified;
            this.Save();

            return entity;
        }
Пример #3
0
        public IHttpActionResult Add(Profile entity)
        {
            try
            {
                this.repo.Insert(entity);

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