Пример #1
0
        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);
        }
Пример #2
0
 partial void DeleteDBImage(DBImage instance);
Пример #3
0
 partial void UpdateDBImage(DBImage instance);
Пример #4
0
 partial void InsertDBImage(DBImage instance);