public int SaveContactDetails(Contact contactModel) { List <SqlParameter> sqlParamters = new List <SqlParameter>() { new SqlParameter() { ParameterName = "@FirstName", SqlDbType = SqlDbType.NVarChar, Value = contactModel.FirstName }, new SqlParameter() { ParameterName = "@LastName", SqlDbType = SqlDbType.NVarChar, Value = contactModel.LastName }, new SqlParameter() { ParameterName = "@Email", SqlDbType = SqlDbType.NVarChar, Value = contactModel.Email }, new SqlParameter() { ParameterName = "@PhoneNumber", SqlDbType = SqlDbType.NVarChar, Value = contactModel.Phone }, new SqlParameter() { ParameterName = "@Status", SqlDbType = SqlDbType.NVarChar, Value = contactModel.Status }, new SqlParameter() { ParameterName = "@Id", SqlDbType = SqlDbType.NVarChar, Value = contactModel.Id }, }; return(SqlFunctions.ExecuteNonQuery("SaveUserContactDetails", sqlParamters)); }
public int DeleteContactInformation(int id) { List <SqlParameter> sqlParamters = new List <SqlParameter>() { new SqlParameter() { ParameterName = "@Id", SqlDbType = SqlDbType.NVarChar, Value = id }, }; return(SqlFunctions.ExecuteNonQuery("DeleteContactInformation", sqlParamters)); }