Example #1
0
 public CelebrityGroup Update(CelebrityGroup celebGroup)
 {
     using (var c = new CelebrityHologramContext())
     {
         c.CelebrityGroup.Update(celebGroup);
         var id = c.SaveChanges();
         return(celebGroup);
     }
 }
Example #2
0
 public int Save(CelebrityGroup celebGroup)
 {
     using (var c = new CelebrityHologramContext())
     {
         c.CelebrityGroup.Add(celebGroup);
         c.SaveChanges();
         return(celebGroup.CelebrityGroupId);
     }
 }
Example #3
0
 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
     });
 }