예제 #1
0
파일: ReadTests.cs 프로젝트: uolton/Mighty
        public void Get_AllColumns()
        {
            dynamic films          = new Films(ProviderName);
            var     singleInstance = films.Get(film_id: 43);

            Assert.AreEqual(43, singleInstance.film_id);
            Assert.Greater(singleInstance.last_update, DateTime.MinValue);
        }
예제 #2
0
        public ActionResult <Film> Get(int id)
        {
            if (!Request.IsAuthorized())
            {
                return(Unauthorized());
            }
            if (!Films.Exists(id))
            {
                return(NotFound($"Film '{id}' not found"));
            }

            return(Ok(Films.Get(id)));
        }