Esempio n. 1
0
        public static void RebuildClientSummaryIndexes <T, U>(KindName name) where T : class, ILocalDbEntity, new() where U : ClientLookupProvider <T>, new()
        {
            var db = new LocalDB3().DB;

            db.DeleteAll <T>();
            db.DropTable <T>();
            db.CreateTable <T>();

            var vmmcReg      = new TableStore(name.Value).GetAllBlobs();
            var allSummaries = new List <T>();

            foreach (var reg in vmmcReg)
            {
                var entity    = Newtonsoft.Json.JsonConvert.DeserializeObject <GeneralEntityDataset>(reg.Value);
                var mySummary = new T().Load(entity) as T;
                allSummaries.Add(mySummary);
            }
            new U().InsertOrReplace(allSummaries);
        }
Esempio n. 2
0
        internal List <NameValuePair> getAllBobsCount()
        {
            if (Kinds == null)
            {
                return(new List <NameValuePair>());
            }

            var toReturn = new List <NameValuePair>();

            foreach (var table in Kinds)
            {
                var res = new TableStore(table).Count();
                toReturn.Add(new NameValuePair()
                {
                    Name = table.Value, Value = res.Result.ToString()
                });
            }
            return(toReturn);
        }
Esempio n. 3
0
        //public bool RebuildIndexes { get; set; }

        public LocalEntityStore()
        {
            _localDb          = new LocalDB();
            defaultTableStore = new TableStore(Constants.KIND_DEFAULT);
            //RebuildIndexes = false;
        }