public void TestMethod1()
        {
            //
            // TODO: Add test logic here
            //
            var context = AccessContext.Create();
            var identityContext = AccessContext.Create();
            var service = new IdentityManagerService(identityContext);

            var users = service.GetUsersAsync(new Access.Models.FilterOptionModel()).Result;

            var center = context.Centers.FirstOrDefault();

            var user = users[1];

            user.CenterId = center.Id;

            var userStore = new UserStore<ApplicationUser>(identityContext);
            var manager = new ApplicationUserManager(userStore);

            var model = new IdentityUserViewModel();
            model.Assign(user);
            
             var result = service.InsertOrUpdate(model,manager).Result;

            Assert.IsNotNull(users);
            
        }
        public static async Task<IdentityUserViewModel> ToIdentityUserViewModelAsync(this ApplicationUser model, IdentityManagerService service)
        {
            var i = new IdentityUserViewModel();
            i.Assign(model);

            if (service != null) i.Role = await service.GetMainRoleForUserAsync(model.Id) ?? "";

            return i;
        }