Beispiel #1
0
        public static int Create(string fileName, Stream data)
        {
            int id;

            using (DbTransaction tran = DbTransaction.Begin())
            {
                //Add file to DB
                id = DBFile.Create(fileName, GetContentTypeByFileName(fileName));

                //Update file data
                DBFile.ReadFromStream(id, data);

                tran.Commit();
            }

            return(id);
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     var db = DBFile.Create("text.txt");
 }