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