public void deletePerson(string name) { using ( projektasEntities database = new projektasEntities()) { var person = new registracija { Name = name }; database.registracijas.Attach(person); database.registracijas.Remove(person); database.SaveChanges(); } }
public void addPersonToRegistration(string name, string email, string password) { using (projektasEntities database = new projektasEntities()) { var person = new registracija { Name = name, Email = email, Password = password }; database.registracijas.Add(person); database.SaveChanges(); } }