builder.AppendFormat(@" SELECT A.* FROM RB_Duty_Frequency AS A WHERE 1=1 ");
builder.AppendFormat(@" SELECT A.*,(SELECT GROUP_CONCAT(SName) from rb_school where `Status`=0 and FIND_IN_SET(SId,a.School_Ids) GROUP BY `Status`=0) as SchoolName FROM RB_Duty_Frequency AS A WHERE 1=1 ");
if(query!=null)
{
if(query.Group_Id>0)
{
builder.AppendFormat(" AND A.{0}={1} ",nameof(RB_Duty_Frequency_ViewModel.Group_Id),query.Group_Id);
}
if(query.Id>0)
{
builder.AppendFormat(" AND A.{0}={1} ",nameof(RB_Duty_Frequency_ViewModel.Id),query.Id);