public CelebrityGroup Update(CelebrityGroup celebGroup) { using (var c = new CelebrityHologramContext()) { c.CelebrityGroup.Update(celebGroup); var id = c.SaveChanges(); return(celebGroup); } }
public int Save(CelebrityGroup celebGroup) { using (var c = new CelebrityHologramContext()) { c.CelebrityGroup.Add(celebGroup); c.SaveChanges(); return(celebGroup.CelebrityGroupId); } }
public static CelebrityGroupDto Map(CelebrityGroup group) { return(new CelebrityGroupDto { CelebrityGroupId = group.CelebrityGroupId, CreatedBy = group.CreatedBy, DateCreated = group.DateCreated, DateEnded = group.DateEnded, DateFormed = group.DateFormed, DateUpdated = group.DateUpdated, Description = group.Description, Name = group.Name, StillActive = group.StillActive, UpdatedBy = group.UpdatedBy }); }