Exemplo n.º 1
0
        public ActionResult Add(AddBrandInput modle)
        {
            modle.ShopID = this.CurrentSession.ShopID;

            this.Service.Add(modle);

            return(this.SuccessMsg("添加成功"));
        }
Exemplo n.º 2
0
        public async Task <AddBrandPayload> AddBrandAsync(
            AddBrandInput input,
            [ScopedService] ApplicationDbContext context)
        {
            var brand = new Brand {
                Name = input.name
            };

            await context.Brands.AddAsync(brand);

            await context.SaveChangesAsync();

            return(new AddBrandPayload(brand));
        }
Exemplo n.º 3
0
 public void Add(AddBrandInput input)
 {
     this.InsertFromDto(input);
 }