public ActionResult Add(AddBrandInput modle) { modle.ShopID = this.CurrentSession.ShopID; this.Service.Add(modle); return(this.SuccessMsg("添加成功")); }
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)); }
public void Add(AddBrandInput input) { this.InsertFromDto(input); }