public async Task DeleteAsyncTest()
        {
            var id     = Guid.NewGuid().ToString();
            var source = new Config
            {
                AppId        = "001",
                Id           = id,
                Group        = "g",
                Key          = "k",
                Value        = "v",
                Description  = "d",
                CreateTime   = DateTime.Now,
                UpdateTime   = DateTime.Now,
                Status       = ConfigStatus.Deleted,
                OnlineStatus = OnlineStatus.Online
            };

            var result = await service.AddAsync(source);

            Assert.IsTrue(result);

            var result1 = await service.DeleteAsync(source);

            Assert.IsTrue(result1);

            var config = fsq.Select <Config>(new
            {
                Id = id
            }).ToOne();

            Assert.IsNull(config);
        }
Ejemplo n.º 2
0
 public async Task <ApiResult> Deletes([FromBody] DeletesInput commonDeleteInput)
 {
     return(new ApiResult(await _configService.DeleteAsync(commonDeleteInput.Ids)));
 }