Ejemplo n.º 1
0
        public async Task AddProviderDataList <T>(int providerID, string tag, List <T> data)
        {
            Stopwatch sw = Stopwatch.StartNew();

            var        type       = data[0].GetType();
            var        properties = type.GetProperties();
            MetaObject mo         = new MetaObject("ProviderData", providerID.ToString());

            mo.AddProperty <List <T> >(tag, (List <T>)data);



            using (MetaDataRepository db = new MetaDataRepository())
            {
                await db.SaveMetaDataAsync(mo);
            }
            sw.Stop();
            Trace.TraceInformation("AddMetaIdeas took {0} ms.", sw.Elapsed.TotalMilliseconds);
        }
Ejemplo n.º 2
0
        public async Task AddMetaIdeas()
        {
            Stopwatch sw = Stopwatch.StartNew();

            using (MetaDataRepository db = new MetaDataRepository())
            {
                MetaObject mo;



                mo = new MetaObject("P-X Idea", Guid.NewGuid().ToString());
                mo.AddProperty <string>("Name", string.Format("name-{0}", 1));
                mo.AddProperty <string>("Description", string.Format("description-{0}", 1));
                mo.AddProperty <string>("Submitter", string.Format("submitter-{0}", 1));

                await db.SaveMetaDataAsync(mo);
            }
            sw.Stop();
            Trace.TraceInformation("AddMetaIdeas took {0} ms.", sw.Elapsed.TotalMilliseconds);
        }