public async Task <IActionResult> DeleteAll() { await Db.Connection.OpenAsync(); var query = new UserQuery(Db); await query.DeleteAllAsync(); return(new OkResult()); }
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()); } }