public IActionResult ProductosPorUsuario([FromQuery] int docente) { try { ProductoCore productoCore = new ProductoCore(dbContext); return(Ok(productoCore.ObtenerProductosDeUnUsuario(docente))); } catch (Exception ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex)); } }
public IActionResult ObtenerMisProductos([FromRoute] int docenteEnSesion) { try { ProductoCore productoCore = new ProductoCore(dbContext); return(Ok(productoCore.ObtenerProductosDeUnUsuario(docenteEnSesion))); } catch (Exception ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex)); } }