// public int Add(Person model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [Person]("); strSql.Append("username,password,age,registerDate,address)"); strSql.Append(" values ("); strSql.Append("@username,@password,@age,@registerDate,@address)"); // var id = DbHelperSql.InsertReturnId(strSql.ToString(), model); return(id); }
// public int Add(User model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [User]("); strSql.Append("Username,PasswordHash,Email,PhoneNumber,IsFirstTimeLogin,AccessFailedCount,CreationDate,IsActive)"); strSql.Append(" values ("); strSql.Append("@Username,@PasswordHash,@Email,@PhoneNumber,@IsFirstTimeLogin,@AccessFailedCount,@CreationDate,@IsActive)"); // var id = DbHelperSql.InsertReturnId(strSql.ToString(), model); return(id); }