コード例 #1
0
 // GET api/values
 public List <PublicationLiteModel> Get()
 {
     if (HttpContext.Current.Request.Headers["Authorization"] == null)
     {
         throw new HttpResponseException(HttpStatusCode.Unauthorized);
     }
     else
     {
         List <PublicationLiteModel> listLiteModel = new List <PublicationLiteModel>();
         foreach (PUBLICATION agency in manager.getList())
         {
             listLiteModel.Add(new PublicationLiteModel(agency));
         }
         return(listLiteModel);
     }
 }