Esempio n. 1
0
        public ActionResult Create()
        {
            var exists = _areaService.Get(properties: new[] { "Id", "AreaName" }).Select(p => new SelectListItem
            {
                Text = p.AreaName,
                Value = p.Id.ToString(),
            }).ToList();
            ViewData["Areas"] = exists;

            var item = new AreaContract()
            {
                Id = Guid.NewGuid()
            };
            var areaViewModel = new AreaViewModel(item);
            return View(areaViewModel);
        }
Esempio n. 2
0
 public AreaViewModel(AreaContract contract)
 {
     AreaContract = contract;
 }