コード例 #1
0
ファイル: EquipmentService.cs プロジェクト: nelly2k/sfiss
 public PaginationResult <Equipment> Search(SearchEquipmentRequest request)
 {
     return(_repoService.Search <Equipment>(request, "Equipment", "Title", (sb, parameters) =>
     {
         sb.AppendNotNull(request.Title, " Title LIKE CONCAT('%',@Title,'%') OR  OtherTitle LIKE CONCAT('%',@Title,'%') ", parameters, nameof(request.Title), request.Title)
         .AppendNotNull(request.ExerciseId, " EXISTS(select * from [ExerciseEquipment] em where em.EquipmentId = e.Id AND em.ExerciseId = @ExerciseId)", parameters, nameof(request.ExerciseId), request.ExerciseId);
     }));
 }
コード例 #2
0
ファイル: EquipmentController.cs プロジェクト: nelly2k/sfiss
 public PaginationResult <Equipment> Post([FromBody] SearchEquipmentRequest request)
 {
     return(_equipmentService.Search(request));
 }