コード例 #1
0
        public Artist FindById(string id)
        {
            Int32 realId;

            if (!Int32.TryParse(id, out realId))
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.NotFound;
                return(null);
            }
            else
            {
                return(artistDao.FindById(realId));
            }
        }
コード例 #2
0
 //[Route("api/Artists/{id:int}")]
 public Artist Get(int id)
 {
     return(artistDao.FindById(id));
 }