// GET: Profiles/Details/5
        public async Task <IActionResult> Details(int?id, ProfilesMasterViewmodel vm)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var profile = await _profilesMaterRepository.GetByIdAsync(id);

            _Mapper.Map(vm, profile);
            if (profile == null)
            {
                return(NotFound());
            }

            return(View(_Mapper.Map <ProfilesMasterViewmodel>(profile)));
        }
示例#2
0
        public async Task <IActionResult> Details(int?id, ProfileMasterDTO dto)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var profilesmaster = await _profilesmasterRepository.GetByIdAsync(id);

            var cto = _Mapper.Map <ProfileMasterDTO>(profilesmaster);

            if (profilesmaster == null)
            {
                return(NotFound());
            }
            return(Ok(cto));
        }