private Login AddNewLoginForCustomer(DefaultContainer context, Customer customer, string loginKeyValue) { var newLogin = new Login { Username = loginKeyValue, }; context.AddToLogin(newLogin); context.SetLink(newLogin, "Customer", customer); context.AddLink(customer, "Logins", newLogin); context.SaveChanges(); return newLogin; }
private Login AddNewLoginForCustomer(DefaultContainer context, Customer customer, string loginKeyValue) { var newLogin = new Login { Username = loginKeyValue, }; context.AddToLogin(newLogin); context.SetLink(newLogin, "Customer", customer); context.AddLink(customer, "Logins", newLogin); context.SaveChanges(); return(newLogin); }