コード例 #1
0
        public void CreateHouse()
        {
            //System.Data.Entity.Database.SetInitializer(new FxHouseInitializer());
            FxHouseContext context = new FxHouseContext();
            var            entity  = new Fx.Entity.FxHouse.HouseBuyInfo()
            {
                Action           = "Action",
                AreaId           = 1,
                Bill             = false,
                CatagroyId       = 1,
                CityId           = 1,
                Controller       = "Controller",
                HasFurniture     = false,
                Mark             = "Mark",
                Price            = 1000,
                PublishTitle     = "Title",
                PublishUserEmail = "PublishUserEmail",
                RoomNumber       = 6,
                UserAccount      = "UserAccount"
            };

            context.HouseBuyInfos.Add(entity);
            context.SaveChanges();
            context.HouseBuyInfos.Remove(entity);
            context.SaveChanges();
        }
コード例 #2
0
 public void CreateHouse()
 {
     //System.Data.Entity.Database.SetInitializer(new FxHouseInitializer());
     FxHouseContext context = new FxHouseContext();
     var entity = new Fx.Entity.FxHouse.HouseBuyInfo()
     {
         Action = "Action",
         AreaId = 1,
         Bill = false,
         CatagroyId = 1,
         CityId = 1,
         Controller = "Controller",
         HasFurniture = false,
         Mark = "Mark",
         Price = 1000,
         PublishTitle = "Title",
         PublishUserEmail = "PublishUserEmail",
         RoomNumber = 6,
         UserAccount = "UserAccount"
     };
     context.HouseBuyInfos.Add(entity);
     context.SaveChanges();
     context.HouseBuyInfos.Remove(entity);
     context.SaveChanges();
 }