Ejemplo n.º 1
0
        // GET api/modes
        /// <summary>
        /// Gets all <see cref="Mode"/> from repository.
        /// </summary>
        /// <returns>The collection of all <see cref="Mode"/> from the repository.</returns>
        public IHttpActionResult Get()
        {
            IEnumerable <Mode> items = service.GetAll();

            if (items != null)
            {
                return(Ok(items));
            }
            else
            {
                return(NotFound());
            }
        }
 public ActionResult Index()
 {
     return(View(service.GetAll()));
 }