Пример #1
0
        public void CreateGoods()
        {
            FxGoodsContext context = new FxGoodsContext();
            var            entity  = new Entity.FxGoods.GoodsTransferInfo()
            {
                Action            = "Action",
                AreaId            = 1,
                ChangeMsg         = "ChangeMsg",
                GoodsConditionMsg = "GoodsConditionMsg",
                GoodsconditonId   = 1,
                IsChange          = false,
                CatagroyId        = 1,
                CityId            = 1,
                Controller        = "Controller",
                IsDelete          = false,
                IsPublish         = false,
                Mark     = "Mark",
                Pictures = new System.Collections.Generic.List <Entity.TransferPicture>()
                {
                    new Entity.TransferPicture()
                    {
                        CdnUrl = "CdnUrl", ImageUrl = "CdnUrl", IsCdn = false, PhysicalPath = "CdnUrl", TransferPictureCatagroy = 2
                    }
                },
                Price            = 1232,
                PublishTitle     = "PublishTitle",
                PublishUserEmail = "PublishUserEmail",
                UserAccount      = "UserAccount"
            };

            context.GoodsTransferInfos.Add(entity);
            context.SaveChanges();
            context.GoodsTransferInfos.Remove(entity);
            context.SaveChanges();
        }
 public void CreateGoods()
 {
     FxGoodsContext context = new FxGoodsContext();
     var entity = new Entity.FxGoods.GoodsTransferInfo()
     {
         Action = "Action",
         AreaId = 1,
         ChangeMsg = "ChangeMsg",
         GoodsConditionMsg = "GoodsConditionMsg",
         GoodsconditonId = 1,
         IsChange = false,
         CatagroyId = 1,
         CityId = 1,
         Controller = "Controller",
         IsDelete = false,
         IsPublish = false,
         Mark = "Mark",
         Pictures = new System.Collections.Generic.List<Entity.TransferPicture>() { 
             new Entity.TransferPicture() { 
                  CdnUrl="CdnUrl", ImageUrl="CdnUrl", IsCdn=false, PhysicalPath="CdnUrl", TransferPictureCatagroy=2
             } 
         },
         Price = 1232,
         PublishTitle = "PublishTitle",
         PublishUserEmail = "PublishUserEmail",
         UserAccount = "UserAccount"
     };
     context.GoodsTransferInfos.Add(entity);
     context.SaveChanges();
     context.GoodsTransferInfos.Remove(entity);
     context.SaveChanges();
 }