public bool Register() { if (Password != null) { User user = new User() { Address = Address, Name = Name, Password = Password, PhoneNumber = PhoneNumber }; //UserRepository<User> repository = new UserRepository<User>(new ApplicationContext("mvvmApp.Dal.Abstract.Entities.ApplicationContext")); //repository.Create(user); try { client.SendData(user); } catch (Exception ex) { } MessageBox.Show("Успішно зареєстровані"); //var el = repository.GetAll(); return(true); } else { MessageBox.Show("Паролі не співпадають"); return(false); } }
public void SendToServer <T>(T elem) { ClientTcpAction client = new ClientTcpAction(); client.SendData(elem); }