コード例 #1
0
ファイル: HomeController.cs プロジェクト: jm-vin78/HomeTrack
        public async Task <IActionResult> Index([FromServices] AppDbContextFactory factory, long?flatId)
        {
            var userId   = HttpContext.GetCurrentUserId();
            var userName = HttpContext.GetCurrentUserName();
            var model    = new ReportsModel();

            using (var context = factory.CreateContext())
            {
                await model.LoadAsync(context, userId, userName, flatId);
            }

            return(View(model));
        }