コード例 #1
0
 public IActionResult Get(Nullable <Int64> id)
 {
     if (id == null)
     {
         return(BadRequest(null));
     }
     else
     {
         var model = _repository.Get(id.Value);
         return(Ok(model));
     }
 }
コード例 #2
0
 public ActionResult <CommonResponeModel> GetAll()
 {
     Data   = shiftRepository.Get().ToList();
     Result = new SuccessResultFactory().Factory(ActionType.Select);
     return(GetCommonRespone());
 }
コード例 #3
0
ファイル: ShiftsController.cs プロジェクト: xprasoulas/grid
        public ActionResult Get(int id)
        {
            var apiResult = TryExecute(() => _shiftRepository.Get(id), "Shift Fetched sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public bool IsShiftCreated(Shift shift)
        {
            var obj = _shiftRepository.Get().FirstOrDefault(x => x.StartTime == shift.StartTime && x.EndTime == shift.EndTime);

            return(obj == null ? false : true);
        }