Beispiel #1
0
 public static NewsGalleryModel NewsGalleryToNewsGalleryModel(NewsGallery gallery)
 {
     return new NewsGalleryModel
     {
         Caption = gallery.Caption,
         Id = gallery.Id,
         Photo = gallery.Photo,
         NewsId = gallery.NewsId
        
     };
 }
 internal NewsGallery AddNewsGallery(NewsGallery gallery)
 {
     db.NewsGalleries.Add(gallery);
     db.SaveChanges();
     return gallery;
 }