using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using GreenTree.Nachtragsmanagement.Services.Test; using GreenTree.Nachtragsmanagement.Web.Framework; using GreenTree.Nachtragsmanagement.Web.Models.Test; using GreenTree.Nachtragsmanagement.Web.Models.User; using Newtonsoft.Json; namespace GreenTree.Nachtragsmanagement.Web.Controllers { public class HomeController : Controller { private readonly IDbRelationService _dbRelationService; public HomeController( IDbRelationService dbRelationService) { _dbRelationService = dbRelationService; } // GET: Home public ActionResult Index() { var relations = _dbRelationService.GetRelations(3, DbRelationFormat.Json); var model = new DbRelationModel { UserJson = relations[0], DeviationJson = relations[1], SiteJson = relations[2], AppendixJson = relations[3] }; return View("~/Views/Home/Index.cshtml", model); } } }