コード例 #1
0
 public PersonBody(PersonInfoModel model)
 {
     this.PersonGroupId  = model.PersonGroupId ?? "";
     this.PersonId       = model.PersonId ?? "";
     this.PersonName     = model.PersonName ?? "";
     this.PersonNameYomi = model.PersonNameYomi ?? "";
 }
コード例 #2
0
        private static PersonInfoModel Build(IQueryable <PersonInfo> records)
        {
            if (records.Count() == 0)
            {
                return(PersonInfoModel.New());
            }

            var model = PersonInfoModel.New();

            model.Id             = records.First <PersonInfo>().Id;
            model.PersonGroupId  = records.First <PersonInfo>().PersonGroupId;
            model.PersonId       = records.First <PersonInfo>().PersonId;
            model.PersonName     = records.First <PersonInfo>().PersonName;
            model.PersonNameYomi = records.First <PersonInfo>().PersonNameYomi;

            return(model);
        }
コード例 #3
0
        public AppResult Get(string _personId)
        {
            var appResult = new AppResult();
            var apiResult = new ApiResult();

            var model = PersonInfoModel.Find(_personId);

            if (model != null)
            {
                var list = new List <PersonBody>
                {
                    new PersonBody(model)
                };
                appResult.appBody = new AppBody(list);
            }
            else
            {
                apiResult.IsSuccessStatusCode = false;
                apiResult.Message             = "Not Found.";
            }
            appResult.apiResult = apiResult;

            return(appResult);
        }
コード例 #4
0
 public Client(string _connectionString)
 {
     PersonInfoModel.Connection(_connectionString);
 }