Example #1
0
 /// <summary>
 /// Method implmentation to delete an existing picture from the database
 /// </summary>
 /// <param name="pictureId"></param>
 public void DeleteGifAnimetedFromDB(int pictureId)
 {
     _pictureContext.Remove(new Picture()
     {
         PictureId = pictureId
     });
     _pictureContext.SaveChanges();
 }
Example #2
0
 /// <summary>
 /// EF implementation to delete an existing and empty category
 /// </summary>
 /// <param name="categoryId"></param>
 public void DeleteCategory(int categoryId)
 {
     _dbContext.Remove(new Category()
     {
         CategoryId = categoryId
     });
     _dbContext.SaveChanges();
 }