Exemple #1
0
 public bool Update(UpdatePicture item)
 {
     using (Context context = new Context())
     {
         EfPictureRepository rep     = new EfPictureRepository(context);
         PictureConvert      convert = new PictureConvert(context);
         return(rep.Update(convert.ToEntity(item)));
     }
 }
Exemple #2
0
 public List <ReadPicture> GetAll()
 {
     using (Context context = new Context())
     {
         EfPictureRepository rep     = new EfPictureRepository(context);
         PictureConvert      convert = new PictureConvert(context);
         return(convert.ToReadList(rep.GetAll()));
     }
 }
Exemple #3
0
 public ReadPicture Remove(int id)
 {
     using (Context context = new Context())
     {
         EfPictureRepository rep     = new EfPictureRepository(context);
         PictureConvert      convert = new PictureConvert(context);
         return(convert.ToRead(rep.Remove(id)));
     }
 }
Exemple #4
0
 public ReadPicture Add(CreatePicture item)
 {
     using (Context context = new Context())
     {
         EfPictureRepository rep     = new EfPictureRepository(context);
         PictureConvert      convert = new PictureConvert(context);
         return(convert.ToRead(rep.Add(convert.ToEntity(item))));
     }
 }