Beispiel #1
0
 private void UpdateModel(Gallery obj, GalleryPostModel model)
 {
     var evt = (model.EventID.HasValue) ? Repo.GetById<Event>(model.EventID.Value) : null;
     obj.Update(model.Name, model.Slug, model.Date,evt);
     obj.SetDefaultImage(Repo.GetById<Image>(model.DefaultImageID));
     Repo.Save(obj);
 }