Beispiel #1
0
        public IActionResult Index()
        {
            ViewBag.Page = "home";

            // Retrieve user name for title
            string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

            user         = user.Substring(user.LastIndexOf('\\') + 1); // Strip off domain name
            ViewBag.User = user;

            CarnadContext db = new CarnadContext();

            ContactViewModel data = new ContactViewModel();

            data.contacts = db.Contacts;

            return(View(data));
        }
Beispiel #2
0
 public ContactsController(CarnadContext context)
 {
     _context = context;
 }
Beispiel #3
0
 public GroupController(CarnadContext cc)
 {
     carnadContext = cc;
 }
Beispiel #4
0
 public HomeController(CarnadContext cc)
 {
     carnadContext = cc;
 }
Beispiel #5
0
 public GroupsController(CarnadContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public CountryController(CarnadContext cc)
 {
     carnadContext = cc;
 }