Esempio n. 1
0
 public UnitsAttributesController(ApplicationDbContext db)
 {
     this._db          = db;
     UnitsAttributesVM = new UnitsAttributesViewModel
     {
         Units    = new Units(),              //instance of units
         Types    = db.Types.ToList(),        //get types from the database
         Statuses = db.Statuses.ToList()      //get statuses from the database
     };
 }
Esempio n. 2
0
 public ProjectController(ApplicationDbContext db, HostingEnvironment he)
 {
     this._db = db;
     this._hostingEnvironment = he;
     UnitsAttributesViewModel = new UnitsAttributesViewModel
     {
         Types    = _db.Types.ToList(),
         Statuses = _db.Statuses.ToList(),
         Units    = new Models.Unit.Units()
     };
 }