public async Task <IHttpActionResult> Get1()
        {
            var personas = await _personaBl.ObtenerTodosAsync();

            if (personas.Count == 0)
            {
                return(ResponseMessage(new HttpResponseMessage(HttpStatusCode.NoContent)));
            }
            return(Ok(personas));
        }
示例#2
0
        public async Task <IActionResult> Get()
        {
            var personas = await _personaBl.ObtenerTodosAsync();

            if (!personas.Any())
            {
                return(NoContent());
            }

            return(Ok(personas));
        }