示例#1
0
        public static OptionServiceModel Create(string id)
        {
            var model = new OptionServiceModel()
            {
                Id = id
            };

            return(model);
        }
        public async void WithModel_ShouldCreateNewOption()
        {
            var dbContext = this.GetDbContext();
            var service   = this.GetService(dbContext);
            var model     = new OptionServiceModel();

            await service.CreateNewAsync(model);

            Assert.Single(dbContext.Options);
        }
示例#3
0
 public async Task EditAsync(OptionServiceModel model)
 {
     await this.adminEditService.EditAsync <Option, OptionServiceModel>(model, model.Id);
 }
示例#4
0
 public async Task CreateNewAsync(OptionServiceModel model)
 {
     await this.adminCreateService.CreateAsync <Option, OptionServiceModel>(model);
 }