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 })); }
public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) { ApplicantProfileRepository <SystemCountryCodePoco> repo = new ApplicantProfileRepository <SystemCountryCodePoco>(false); SystemCountryCodeLogic log = new SystemCountryCodeLogic(repo); return(log.Get(Id)); }
public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) { SystemCountryCodeLogic logic = new SystemCountryCodeLogic (new EFGenericRepository <SystemCountryCodePoco>(false)); return(logic.Get(Id)); }
//GetSingle public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) //changed { EFGenericRepository <SystemCountryCodePoco> repo = new EFGenericRepository <SystemCountryCodePoco>(false); SystemCountryCodeLogic logic = new SystemCountryCodeLogic(repo); return(logic.Get(Id)); //changed }
public SystemCountryCodePoco GetSingleSystemCountryCode(string Code) { EFGenericRepository <SystemCountryCodePoco> systemcountrycoderepo = new EFGenericRepository <SystemCountryCodePoco>(false); SystemCountryCodeLogic _systemcountrycodelogic = new SystemCountryCodeLogic(systemcountrycoderepo); return(_systemcountrycodelogic.Get(Code)); }
public SystemCountryCodePoco GetSingleSystemCountryCode(string code) { EFGenericRepository <SystemCountryCodePoco> SystemCountryCodeRepo = new EFGenericRepository <SystemCountryCodePoco>(false); var Logic = new SystemCountryCodeLogic(SystemCountryCodeRepo); return(Logic.Get(code)); }
public SystemCountryCodePoco GetSingleSystemCountryCode(String code) { EFGenericRepository <SystemCountryCodePoco> repo = new EFGenericRepository <SystemCountryCodePoco>(false); SystemCountryCodeLogic logic = new SystemCountryCodeLogic(repo); return(logic.Get(code)); }
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)); }
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()); } }
public ActionResult GetSystemCountryCode(string systemCountryCodeId) { SystemCountryCodePoco systemCountryCodePoco = _logic.Get(systemCountryCodeId); if (systemCountryCodePoco == null) { return(NotFound()); } else { return(Ok(systemCountryCodePoco)); } }
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 } )); }
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); } }
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)); } }
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); } }
public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) { return(_systemCountryCodeLogic.Get(Id)); }
public SystemCountryCodePoco GetSingleSystemCountryCode(Guid code) { var _logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false)); return(_logic.Get(code)); }
public SystemCountryCodePoco GetSingleSystemCountryCode(string countryCode) { return(_SystemCountryCodeLogic.Get(countryCode)); }
// return single public SystemCountryCodePoco GetSingleSystemCountryCode(string Id) { var reference = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false)); return(reference.Get(Id)); }
public SystemCountryCodePoco GetSingleSystemCountryCodePoco(String Id) { return(_logic.Get(Id)); }