Пример #1
0
        public async Task <IEnumerable <School> > GetSchoolENV1(int skip, int take, string orderBy, string direction = "DESC", string search = "")
        {
            var schools = await Task.FromResult(_dapper.GetAll <School>($"SELECT * FROM [Schools] WHERE SchoolName like '%{search}%' ORDER BY {orderBy} {direction} OFFSET {skip} ROWS FETCH NEXT {take} ROWS ONLY;", null, commandType: CommandType.Text));

            return(schools);
        }