public static void AddPhoto(PhotoModel model) { using (var context = DatabaseContext.Create()) { context.AddPhoto(model); } }
public void AddPhoto(PhotoModel model) { AspNetPhotos.Add(model); SaveChanges(); }