Exemplo n.º 1
0
        public IHttpActionResult Get([FromUri] int id)
        {
            MusicalGenre retorno = null;

            try
            {
                MusicalGenreBusiness musicalGenreBusiness = new MusicalGenreBusiness();
                retorno = musicalGenreBusiness.Get(id);
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }

            return(Ok(retorno));
        }
Exemplo n.º 2
0
        public IHttpActionResult GetAll()
        {
            IEnumerable <MusicalGenre> retorno = null;

            try
            {
                MusicalGenreBusiness musicalGenreBusiness = new MusicalGenreBusiness();
                retorno = musicalGenreBusiness.GetAll();
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }

            return(Ok(retorno));
        }