示例#1
0
        public async Task <IActionResult> DeleteAll()
        {
            await Db.Connection.OpenAsync();

            var query = new UserQuery(Db);
            await query.DeleteAllAsync();

            return(new OkResult());
        }
示例#2
0
        public async Task <IActionResult> DeleteAll()
        {
            using (var db = new AppDb())
            {
                await db.Connection.OpenAsync();

                var query = new UserQuery(db);
                await query.DeleteAllAsync();

                return(new OkResult());
            }
        }