GenFu icon indicating copy to clipboard operation
GenFu copied to clipboard

System.ArgumentException: Property set method not found.

Open attiqeurrehman opened this issue 9 years ago • 0 comments

Hi I am running the following code in Seed method:

            var store = new UserStore<ApplicationUser>(context);
            var manager = new UserManager<ApplicationUser>(store);
            var passwordHash = new PasswordHasher();
            string password = passwordHash.HashPassword("Password@123");

            var users = Angie
                        .Configure<ApplicationUser>()
                        .Fill(user => user.UserName, () => { return Jen.FirstName(); })
                        .Fill(user => user.Email, () => { return Jen.Email(); })
                        .Fill(user => user.PasswordHash, () => { return password; })
                        .Fill(user => user.SecurityStamp, () => { return Guid.NewGuid().ToString(); })
                        .MakeList<ApplicationUser>();

            context.Users.AddOrUpdate(users.ToArray());

And I am getting the following error:

System.ArgumentException: Property set method not found. at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at Angela.Core.Angie.SetPropertyValue[T](T instance, PropertyInfo property) at Angela.Core.Angie.FastFill[T](T instance) at Angela.Core.Angie.FastMakeT at Angela.Core.Angie.BuildList[T](Int32 itemCount) at Angela.Core.Angie.FastListT at Angela.Core.AngieConfigurator.FastListT at Angela.Core.AngieConfigurator.MakeListT

attiqeurrehman avatar Aug 04 '15 11:08 attiqeurrehman