Giter VIP home page Giter VIP logo

devexpress-examples / dashboarddifferentuserdataaspnetcore Goto Github PK

View Code? Open in Web Editor NEW
3.0 54.0 1.0 5.44 MB

This example shows how to configure the ASP.NET Core Dashboard control so that it loads data in the multi-user environment.

License: Other

C# 72.76% HTML 26.22% JavaScript 1.02%
business-intelligence asp-net-core web-dashboard dashboard-for-asp-net-core roles authentication multi-tenant multi-user security

dashboarddifferentuserdataaspnetcore's Introduction

BI Dashboard for ASP.NET Core - How to load different data based on the current user

This example shows how to configure the Dashboard control so that it loads data in the multi-user environment.

You can identify a user in the current session and handle the following events to select the underlying data source:

Files to Review

Example Structure

You can limit access to data based on the current user's ID. This ID is stored in the IHttpContextAccessor.HttpContext.Session.GetString("CurrentUser") value from session state. We use the standard IHttpContextAccessor with dependency injection to access the HTTP context in custom dashboard configurator.

When the application starts, you see the Index view with a ComboBox in which you can select a user. When you click the Sign in button, the ID of the selected user is passed to the CurrentUser session variable and you are redirected to the Dashboard view. In this view, the Web Dashboard control displays the lists of dashboards and every dashboard loads data available to the selected user. Below is a table that illustrates the user IDs and their associated datasources in this example:

Role Sql Json Excel Object Extract Entity Framework
Admin Categories Customers Bikes Sales Sales Categories
User Categories from different source with optional filter Customers from different source with optional filter Bikes from different source Sales from different source - Categories from different source
Guest - - - - - -

Documentation

More Examples

dashboarddifferentuserdataaspnetcore's People

Contributors

alexanderkovalenko avatar andreylepikhov avatar natakazakova avatar pollyndos avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jampies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.