private void FillData() { _newGroupCode = new GroupCode("Detalle"); _newUser = new Member { FirstName = "Juan", LastName = "LastName" }; var member = new Member(); Context.Members.Add(member); Context.Members.Add(_newUser); Context.SaveChanges(); _newGroupCode.AddMember(_newUser, _newGroupCode.Code); _newGroupCode.AddMember(member, _newGroupCode.Code); Context.GroupCodes.Add(_newGroupCode); Context.SaveChanges(); }
private void FillData() { _newGroupCode = new GroupCode("Detalle"); _newBadge = new Badge(); _newMember = new Member(); Context.GroupCodes.Add(_newGroupCode); _newGroupCode.AddMember(_newMember, _newGroupCode.Code); Context.Members.Add(_newMember); Context.Badges.Add(_newBadge); Context.SaveChanges(); }
private async Task FillData() { _eventToAdd = new Event(); _member = new Member { Email = "*****@*****.**", Role = UserRole.Member }; Context.Events.Add(_eventToAdd); Context.Members.Add(_member); await Context.SaveChangesAsync(); _groupCode = _eventToAdd.CreateGroupCode("Test"); _groupCode.AddMember(_member); await Context.SaveChangesAsync(); }
private void FillData() { _newGroupCode = new GroupCode("Detalle"); _newUser = new Member { FirstName = "Juan", LastName = "LastName" }; var member = new Member(); var member1 = new Member(); var member2 = new Member(); var member3 = new Member(); var member4 = new Member(); var member5 = new Member(); var member6 = new Member(); Context.Members.Add(member); Context.Members.Add(member1); Context.Members.Add(member2); Context.Members.Add(member3); Context.Members.Add(member4); Context.Members.Add(member5); Context.Members.Add(member6); Context.Members.Add(_newUser); Context.SaveChanges(); _newGroupCode.AddMember(_newUser, _newGroupCode.Code); _newGroupCode.AddMember(member, _newGroupCode.Code); _newGroupCode.AddMember(member1, _newGroupCode.Code); _newGroupCode.AddMember(member2, _newGroupCode.Code); _newGroupCode.AddMember(member3, _newGroupCode.Code); _newGroupCode.AddMember(member4, _newGroupCode.Code); _newGroupCode.AddMember(member5, _newGroupCode.Code); _newGroupCode.AddMember(member6, _newGroupCode.Code); Context.GroupCodes.Add(_newGroupCode); Context.SaveChanges(); }