public Task <List <Teams> > ListAll(int skip, int take, string orderBy, string direction = "DESC", string search = "") { var teams = Task.FromResult(_dapperService.GetAll <Teams>( $@"SELECT * FROM [Teams] WHERE Name like '%{search}%' ORDER BY {orderBy} {direction} OFFSET {skip} ROWS FETCH NEXT {take} ROWS ONLY; ", null, commandType: CommandType.Text)); return(teams); }
public async Task <List <Item> > GetAll() { var result = await Task.FromResult(_dapper.GetAll <Item>("select * from Item", null, commandType: CommandType.Text)); return(result); }