//if you have innter joins or anything//this is an example if you want a custom query, especially thos with inner joins.publicDataTableGetUsersWhereAdmin() //you can pass an argument exanmple the "user_type" for the where{stringquery=@" SELECTu.idASId,u.user_nameASUserName,u.first_nameASFirstName,r.last_nameASLastName,r.user_typeUserType,r.is_activeIsActiveFROMusers_localuLEFTJOINuser_accessrONu.role_id=r.idWHEREu.user_type=?user_typeANDu.is_active=?is_active";varwhere=newDictionary<string,object>{{"user_type","Administrator"},{"is_active","Y"}};returnView(query,where); }//this is an example if you want a custom query, especially thos with inner joins.publicDataTableGetAllUsers() //no where{ string query= @" SELECT u.id AS Id, u.user_name AS UserName, u.first_name AS FirstName, u.last_name AS LastName, u.user_type UserType, u.is_active IsActive FROM users_local u"; return View(query); }