public ActionResult Add(User model) { UserSer ser = new UserSer(); if (model != null && ser.GetUser(model.Id).Users.Count == 0) { ser.AddUser(model.Name, model.BDay); } else { ser.UpdateUser(model); } return(Redirect("~/User")); }
public static int AddUser(User user) { return(UserSer.AddUser(user)); }