private static Image GetImageByIdThreadSafe(int id) { Image image = null; using (Dao.LocalDataContext db = new OMLEngine.Dao.LocalDataContext(true)) { Dao.DBImage dbImage = db.Context.DBImages.SingleOrDefault(i => i.Id == id); if (dbImage != null) { image = ByteArrayToImage(dbImage.Image.ToArray()); } } return(image); }
partial void DeleteDBImage(DBImage instance);
partial void UpdateDBImage(DBImage instance);
partial void InsertDBImage(DBImage instance);