예제 #1
0
 public static ProjectGalleryModel ProjectGalleryToProjectGalleryModel(ProjectGallery gallery)
 {
     return new ProjectGalleryModel
     {
         Caption = gallery.Caption,
         Id = gallery.Id,
         Photo = gallery.Photo,
         ProjectId = gallery.ProjectId,
         ProjectName = gallery.Project.ProjectName
     };
 }
예제 #2
0
 internal ProjectGallery AddProjectGallery(ProjectGallery gallery)
 {
     db.ProjectGalleries.Add(gallery);
     db.SaveChanges();
     return gallery;
 }