public bool Register(User user) { try { var add = new user { Username = user.username, Firstname = user.firstname, Lastname = user.lastname, Adress = user.adress, Password = user.password }; _db.user.Add(add); _db.SaveChanges(); return true; } catch (Exception e) { Console.Error.WriteLine("Register user threw: \n" + e.Message); return false; } }
public bool Register(User user) { return _service.Register(user); }
public bool Register(User user) { return user != null && _provider.Register(user); }