예제 #1
0
        public ActionResult Groups()
        {
            IEnumerable <GroupViewModel> groups = new List <GroupViewModel>();

            using (var admin = new AuthenticationServiceClient())
            {
                Mapper.Initialize(o => o.CreateMap <AuthenticationService.GroupDataContract, GroupViewModel>());
                groups = Mapper.Map <IEnumerable <AuthenticationService.GroupDataContract>, IEnumerable <GroupViewModel> >(admin.GetGroups());
            }
            return(View(groups));
        }