Exemplo n.º 1
0
 public static Domain.Models.Place GenerateDomainModelPlace()
 {
     var p = new Domain.Models.Place
     {
         Latitude = 1.231234F,
         Longitude = 45.3333F,
         Name = "El Bareto",
         Description = "Place description"
     };
     return p;
 }
Exemplo n.º 2
0
        public RavenSessionTest()
        {
            Store = new EmbeddableDocumentStore
                         {
                             RunInMemory = true,
                             DataDirectory = "RavenData",
                         };

            Store.Initialize();
            IndexCreation.CreateIndexes(typeof(RavenIndexes).Assembly, Store);
            Session = Store.OpenSession();

            var user = DataGenerator.GenerateDomainModelUser();

            Session.Store(user);
            Session.SaveChanges();

            var list = DataGenerator.GenereateDomainModelList();

            Session.Store(list);
            Session.SaveChanges();

            var p1 = new Domain.Models.Place
            {
                Description =
                    "Nice selection of guest ales, Live dodgy eighties rock bands. Perfect.",
                Latitude = 52.002324f,
                Longitude = -0.5734f,
                Name = "The Duck and Drake",
                List = "lists/1"
            };
            var p2 = new Domain.Models.Place
            {
                Description =
                    "Kinda trendy place - multiple rooms, decent beer from Leeds brewary and guests",
                Latitude = 52.002324f,
                Longitude = -0.5734f,
                Name = "The Adelphi",
                List = "lists/1"
            };

            Session.Store(p1);
            Session.Store(p2);
            Session.SaveChanges();
        }