Example #1
0
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var client = await _context.Clients.SingleOrDefaultAsync(m => m.ID == id);

            if (client == null)
            {
                return(NotFound());
            }

            PrepareVoivodeshipsAndCountires();
            return(View(ClientMapper.MapClientToView(client, _context)));
        }
Example #2
0
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var client = await _context.Clients
                         .SingleOrDefaultAsync(m => m.ID == id);

            if (client == null)
            {
                return(NotFound());
            }

            return(View(ClientMapper.MapClientToView(client, _context)));
        }