public async Task <IEnumerable <Category> > GetAllAsync() { using (var connection = context.CreateConnection()) { return(await connection.QueryAsync <Category>(CategoryQuery.All())); } }
public IEnumerable <Category> GetAll() { using (var connection = context.CreateConnection()) { return(connection.Query <Category>(CategoryQuery.All())); } }