コード例 #1
0
 public IEnumerable <Image> GetImages()
 {
     using (var context = new ImageDataContext(_connectionString))
     {
         return(context.Images.ToList());
     }
 }
コード例 #2
0
 public void AddImage(Image image)
 {
     using (var context = new ImageDataContext(_connectionString))
     {
         context.Images.InsertOnSubmit(image);
         context.SubmitChanges();
     }
 }