示例#1
0
        public override Task <SystemCountryCodePayload> ReadSystemCountryCode(SystemCountryCodeRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(request.Code);

            return(new Task <SystemCountryCodePayload>(() => new SystemCountryCodePayload()
            {
                Code = poco.Code,
                Name = poco.Name
            }));
        }
        public override Task <SystemCountryCodePayload> ReadSystemCountryCode(SystemCountryCodeCodeRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(request.Code);

            _ = poco ?? throw new ArgumentException("No System Country Code with this Code Found ");

            return(new Task <SystemCountryCodePayload>(() => new SystemCountryCodePayload()
            {
                Code = poco.Code,
                Name = poco.Name
            }));
        }
示例#3
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(string Id)
        {
            ApplicantProfileRepository <SystemCountryCodePoco> repo = new ApplicantProfileRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic log = new SystemCountryCodeLogic(repo);

            return(log.Get(Id));
        }
示例#4
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(string Id)
        {
            SystemCountryCodeLogic logic = new SystemCountryCodeLogic
                                               (new EFGenericRepository <SystemCountryCodePoco>(false));

            return(logic.Get(Id));
        }
示例#5
0
        //GetSingle
        public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) //changed
        {
            EFGenericRepository <SystemCountryCodePoco> repo = new EFGenericRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic logic = new SystemCountryCodeLogic(repo);

            return(logic.Get(Id)); //changed
        }
示例#6
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(string Code)
        {
            EFGenericRepository <SystemCountryCodePoco> systemcountrycoderepo = new EFGenericRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic _systemcountrycodelogic = new SystemCountryCodeLogic(systemcountrycoderepo);

            return(_systemcountrycodelogic.Get(Code));
        }
示例#7
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(string code)
        {
            EFGenericRepository <SystemCountryCodePoco> SystemCountryCodeRepo = new EFGenericRepository <SystemCountryCodePoco>(false);
            var Logic = new SystemCountryCodeLogic(SystemCountryCodeRepo);

            return(Logic.Get(code));
        }
示例#8
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(String code)
        {
            EFGenericRepository <SystemCountryCodePoco> repo = new EFGenericRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic logic = new SystemCountryCodeLogic(repo);

            return(logic.Get(code));
        }
示例#9
0
        public IHttpActionResult GetSystemCountryCode(string SystemCountryCodeId)
        {
            SystemCountryCodePoco systemCountryCode = _logic.Get(SystemCountryCodeId);

            if (systemCountryCode == null)
            {
                return(NotFound());
            }
            return(Ok(systemCountryCode));
        }
        public IHttpActionResult GetSystemCountryCode(string code)
        {
            SystemCountryCodePoco poco = _logic.Get(code);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
示例#11
0
        public IHttpActionResult GetSystemCountryCode(string systemCountryCodeCode)
        {
            SystemCountryCodePoco appEdu = _logic.Get(systemCountryCodeCode);

            if (appEdu == null)
            {
                return(NotFound());
            }
            return(Ok(appEdu));
        }
        public ActionResult GetSystemCountryCode(String id)
        {
            SystemCountryCodePoco poco = _logic.Get(id);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
        public ActionResult GetSystemCountryCode(string Code)
        {
            var poco = _logic.Get(Code);

            if (poco == null)
            {
                return(NotFound());
            }

            return(Ok(poco));
        }
        public ActionResult GetSystemCountryCode(string systemcountrycode)
        {
            SystemCountryCodePoco poco = _logicref.Get(systemcountrycode);

            if (poco == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(poco));
            }
        }
        public ActionResult GetSystemCountryCode(string code)
        {
            SystemCountryCodePoco poco = logic.Get(code);

            if (poco != null)
            {
                return(Ok(poco));
            }
            else
            {
                return(NotFound());
            }
        }
示例#16
0
        public ActionResult GetSystemCountryCode(string systemCountryCodeId)
        {
            SystemCountryCodePoco systemCountryCodePoco = _logic.Get(systemCountryCodeId);

            if (systemCountryCodePoco == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(systemCountryCodePoco));
            }
        }
示例#17
0
        public override Task <SysCountryCodeProto> GetSystemCountryCode(SysCountryIdRequest request, ServerCallContext context)
        {
            SystemCountryCodePoco poco = _logic.Get(request.Id);

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException("No such Country code exists");
            }
            return(new Task <SysCountryCodeProto>(
                       () => new SysCountryCodeProto
            {
                Code = poco.Code,
                Name = poco.Name
            }));
        }
 public IHttpActionResult GetSystemCountryCode(string systemCountryCodeId)
 {
     try
     {
         SystemCountryCodePoco poco = _logic.Get(systemCountryCodeId);
         if (poco == null)
         {
             return(NotFound());
         }
         return(Ok(poco));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
        public override Task <SystemCountryCodePayLoad> ReadSystemCountryCode(IdRequestSysCountryCode request, ServerCallContext context)
        {
            SystemCountryCodePoco poco = _logic.Get(request.Id);

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException("poco is null");
            }

            return(new Task <SystemCountryCodePayLoad>(
                       () => new SystemCountryCodePayLoad()
            {
                Code = poco.Code,
                Name = poco.Name
            }
                       ));
        }
示例#20
0
 public IHttpActionResult GetSystemCountryCode(string SystemCountryCode)
 {
     try
     {
         SystemCountryCodePoco item = _logicObj.Get(SystemCountryCode);
         if (item != null)
         {
             return(this.Ok(item));
         }
         else
         {
             return(this.NotFound());
         }
     }
     catch (Exception e)
     {
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e);
         throw new HttpResponseException(response);
     }
 }
示例#21
0
        public IHttpActionResult GetSystemCountryCode(Guid Id)
        {
            if (Id == null)
            {
                return(BadRequest());
            }
            try
            {
                SystemCountryCodePoco poco = _logic.Get(Id);

                if (poco == null)
                {
                    return(NotFound());
                }

                return(Ok(poco));
            }
            catch (Exception e)
            {
                return(InternalServerError(e));
            }
        }
示例#22
0
 public SystemCountryCodePoco GetSingleSystemCountryCode(String code)
 {
     try
     {
         SystemCountryCodeLogic logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));
         return(logic.Get(code));
     }
     catch (AggregateException e)
     {
         List <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>().ToList();
         foreach (ValidationException err in exceptions)
         {
             ValidationFault fault = new ValidationFault();
             fault.Result      = false;
             fault.Message     = "Country Read Problem";
             fault.Description = err.Message;
             FaultException <ValidationFault> fe = new FaultException <ValidationFault>(fault, new FaultReason(fault.Message));
             throw fe;
         }
         return(null);
     }
 }
示例#23
0
 public SystemCountryCodePoco GetSingleSystemCountryCode(string Id)
 {
     return(_systemCountryCodeLogic.Get(Id));
 }
示例#24
0
        public SystemCountryCodePoco GetSingleSystemCountryCode(Guid code)
        {
            var _logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));

            return(_logic.Get(code));
        }
示例#25
0
 public SystemCountryCodePoco GetSingleSystemCountryCode(string countryCode)
 {
     return(_SystemCountryCodeLogic.Get(countryCode));
 }
示例#26
0
        // return single
        public SystemCountryCodePoco GetSingleSystemCountryCode(string Id)
        {
            var reference = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));

            return(reference.Get(Id));
        }
示例#27
0
 public SystemCountryCodePoco GetSingleSystemCountryCodePoco(String Id)
 {
     return(_logic.Get(Id));
 }