public static List <TPage> GetAllDataWithMap(string whereQuery) { string baseWhereQuery = " Where IsDeleted=0"; if (!string.IsNullOrEmpty(whereQuery)) { baseWhereQuery = baseWhereQuery + " AND " + whereQuery; } ReturnOutput returnOutput = new ReturnOutput(); var repository = BaseCommonRepository <T> .BaseRepository(); var data = repository.Find(baseWhereQuery, ref returnOutput); var retVal = MappingExtensions.ToModel <T, TPage>(data.ToList()); return(retVal); }