/// <summary> /// Method to delete a picture. /// </summary> /// <param name="picture">The Picture entity to delete.</param> /// <returns>The deleted Picture entity.</returns> public PictureEntity Delete(PictureEntity picture) { using (Db.Context) { Db.Context.Attach(picture); return(PictureManager.Delete(picture)); } }
/// <summary> /// Method to delete a list of pictures. /// </summary> /// <param name="pictures">A list of Picture entity to delete.</param> /// <returns>The deleted Picture entity list.</returns> public List <PictureEntity> Delete(List <PictureEntity> pictures) { using (Db.Context) { foreach (PictureEntity p in pictures) { Db.Context.Attach(p); } return(PictureManager.Delete(pictures)); } }