public EventDescription PostSave(EventDescription description) { if (description.Id > 0) { return DescriptionService.UpdateDescription(description); } else { return DescriptionService.CreateDescription(description); } }
public static EventDescription UpdateDescription(EventDescription description) { ApplicationContext.Current.DatabaseContext.Database.Update(description); return description; }