public Profile Insert(Profile entity) { this.ctx.Profiles.Add(entity); this.Save(); return entity; }
public Profile Update(Profile entity) { this.ctx.Entry(entity).State = System.Data.Entity.EntityState.Modified; this.Save(); return entity; }
public IHttpActionResult Add(Profile entity) { try { this.repo.Insert(entity); return Ok(); } catch (Exception ex) { return InternalServerError(ex); } }