public int RegisterUser(string email, string password, string DOB, string firstname, string lastname, string phone, string streetAddress, string zip, string country, string city) { using (var context = new ModelDataContext()) { var userRegitration = context.GetTable<UserInfo>(); var newUser = new UserInfo() { email = email, password = password, DOB = DateTime.Parse(DOB), FirstName = firstname, LastName = lastname, City =city, Country = country, Id = Guid.NewGuid(), Phone = phone, StreetAddress = streetAddress, Zip =zip }; userRegitration.InsertOnSubmit(newUser); context.SubmitChanges(); return 1; } return -1; }
partial void UpdateUserInfo(UserInfo instance);
partial void DeleteUserInfo(UserInfo instance);
partial void InsertUserInfo(UserInfo instance);