Exemplo n.º 1
0
        public string GetStudiesBySite(SiteApiParameter model)
        {
            var result = new DataServiceResult <List <StudyModel> >();

            try
            {
                var data = siterepo.GeStudiesBySiteId(model);
                if (data != null)
                {
                    result.Success = true;
                    result.Value   = data;
                }
            }
            catch (Exception ex)
            {
                result.Success       = false;
                result.ExceptionInfo = new ExceptionInfo(ex);
            }
            return(JsonConvert.SerializeObject(result));
        }