Пример #1
0
        public override void Update(Models.Schema @new, Models.Schema old)
        {
            base.Update(@new, old);

            try
            {
                SchemaManager.Update(@new, old);
            }
            catch (SqlCeException e)
            {
            }
        }
Пример #2
0
        public override void Update(Models.Schema @new, Models.Schema old)
        {
            base.Update(@new, old);

            try
            {
                SchemaManager.Update(@new, old);
            }
            catch
            {
            }
        }
Пример #3
0
        public static string GetConnectionString(this Repository repository)
        {
            var dataPath = new DataPath(repository.Name);
            var dataFile = Path.Combine(dataPath.PhysicalPath, repository.Name + ".sdf");

            var connectionString = string.Format("Data Source={0};Persist Security Info=False;", dataFile);

            if (!File.Exists(dataFile))
            {
                DatabaseHelper.CreateDatabase(dataFile, connectionString);
                SchemaManager.InitializeDatabase(repository);
            }
            return(connectionString);
        }
Пример #4
0
 public override void Initialize(Models.Schema schema)
 {
     SchemaManager.Add(schema);
 }
Пример #5
0
        public override void Remove(Models.Schema item)
        {
            base.Remove(item);

            SchemaManager.Delete(item);
        }