예제 #1
0
        public ActionResult Add(AddBrandInput modle)
        {
            modle.ShopID = this.CurrentSession.ShopID;

            this.Service.Add(modle);

            return(this.SuccessMsg("添加成功"));
        }
예제 #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));
        }
예제 #3
0
 public void Add(AddBrandInput input)
 {
     this.InsertFromDto(input);
 }