Ejemplo n.º 1
0
        public async Task <IHttpActionResult> ClassroomList()
        {
            try
            {
                var list = await _service.GetAllViewAsync();

                await _service.CommitAsync();

                return(Ok(new { List = list }));
            }
            catch (Exception ex)
            {
                await _service.RollbackAsync();

                return(BadRequest(GetError(ex)));
            }
        }