Ejemplo n.º 1
0
        public async Task <IHttpActionResult> Read(string testId)
        {
            var result = await TestsDao.Read(this, testId);

            if (result == null)
            {
                return(NotFound());
            }

            return(JsonWithPermissions(result));
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> Update(string testId, TestsEditViewModel model)
        {
            var test = await TestsDao.Read(this, testId);

            if (test == null)
            {
                return(NotFound());
            }

            var result = await TestsDao.Update(this, test, model);

            return(JsonWithPermissions(result));
        }