Exemplo n.º 1
0
        private async Task<bool> DocSizeExperiment()
        {
            using (var store = new PatientStore(Configuration))
            {
                await store.Setup();
                for (var i = 0; i < 1; i++)
                {
                    var patient = new Patient();
                    patient.Birthdate = DateTime.Now;
                    patient.Id = i.ToString();
                    patient.Name = "Scott" + i.ToString();
                    patient.Procedures = new List<Procedure>();

                    for (var count = 0; count < 7000; count++)                    
                    {
                        var procedure = new Procedure { Code = GenerateCode(), Ordinal = count, Performed = DateTime.Now };
                        patient.Procedures.Add(procedure);
                    };
                    var collectionUsage = await store.Save(patient);
                    Console.WriteLine(collectionUsage);
                }
                await store.TearDown();
            }

            return true;
        }
Exemplo n.º 2
0
        private async Task<bool> DocSerializtionExperiment()
        {
            var store = new PatientStore(Configuration);
            await store.Setup();

            var patient = new Patient();
            patient.Name = "Scott";
            patient.Medications = null;

            await store.Save(patient);

            //await store.TearDown();
            return true;
        }