private IQueryable <Form> Apply(IQueryable <Form> Forms, FormSearchEntity FormSearchEntity) { if (FormSearchEntity.StudentClassId != Guid.Empty) { Forms = Forms.Where(vs => vs.StudentClassId.Equals(FormSearchEntity.StudentClassId)); } return(Forms); }
public int Count(UserEntity userEntity, FormSearchEntity FormSearchEntity) { if (FormSearchEntity == null) { FormSearchEntity = new FormSearchEntity(); } IQueryable <Form> Forms = context.Forms; Forms = Apply(Forms, FormSearchEntity); return(Forms.Count()); }
public List <FormEntity> List(UserEntity userEntity, FormSearchEntity FormSearchEntity) { if (FormSearchEntity == null) { FormSearchEntity = new FormSearchEntity(); } IQueryable <Form> Forms = context.Forms; Forms = Apply(Forms, FormSearchEntity); //Forms = FormSearchEntity.SkipAndTake(Forms); return(Forms.Select(l => new FormEntity(l)).ToList()); }
public List <FormEntity> List(FormSearchEntity FormSearchEntity) { return(FormService.List(UserEntity, FormSearchEntity)); }
public int Count(FormSearchEntity FormSearchEntity) { return(FormService.Count(UserEntity, FormSearchEntity)); }