コード例 #1
0
 public object GetSingleFaculty([FromBody] FacultyParameters obj)
 {
     try
     {
         GetSingleFaculty ObjFaculty = new GetSingleFaculty();
         var result = ObjFaculty.GetFaculty(obj);
         return(result);
     }
     catch (Exception e)
     {
         return(new Error()
         {
             IsError = true, Message = e.Message
         });
     }
 }
コード例 #2
0
        public object GetFaculty(FacultyParameters obj)
        {
            var ResultGetFaculty = db.Vw_GetSingleFaculty.Where(r => r.UserId == obj.UserId).FirstOrDefault();

            if (ResultGetFaculty == null)
            {
                return(new Error()
                {
                    IsError = true, Message = "Faculty Is Not Found"
                });
            }
            else
            {
                //  return new Result() { IsSucess = true, ResultData = ResultGetFaculty };
                return(ResultGetFaculty);
            }
        }