Exemple #1
0
        public BioVM GetById(int id)
        {
            var service_result = service.GetById(id);

            BioVM api_result = Mapper.Map <Bio, BioVM>(service_result);

            return(api_result);
        }
        public BioVM getBio(int id)
        {
            var querystring = ApiStrings.bio + id;

            var   bio_result = fetcher.GetJson(ApiStrings.domain, querystring);
            BioVM bio_root   = JsonConvert.DeserializeObject <BioVM>(bio_result);

            return(bio_root);
        }
Exemple #3
0
        public BioVM Add(BioVM bio)
        {
            Bio service_result = service.Add(new Bio
            {
                Bio1    = bio.Bio1,
                User_ID = bio.User_ID
            });

            service.Save();

            BioVM api_result = Mapper.Map <Bio, BioVM>(service_result);

            return(api_result);
        }