/// <summary> /// /// </summary> /// <param name="criteria"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public static KandaDbDataReader Select(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var reader = KandaTableDataGateway._factory.CreateReader(connection, transaction); reader.CommandText = @"usp_SelectMembershipUsers"; KandaDbDataMapper.MapToParameters(reader, criteria); var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value); reader.Parameters.Add(result); reader.ExecuteReader(); return reader; }
/// <summary> /// /// </summary> /// <param name="entity"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public static int Delete(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction); command.CommandText = @"usp_DeleteMembershipUsers"; KandaDbDataMapper.MapToParameters(command, criteria); var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value); command.Parameters.Add(result); command.ExecuteNonQuery(); return((int)result.Value); }
/// <summary> /// /// </summary> /// <param name="criteria"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public static KandaDbDataReader Select(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var reader = KandaTableDataGateway._factory.CreateReader(connection, transaction); reader.CommandText = @"usp_SelectMembershipUsers"; KandaDbDataMapper.MapToParameters(reader, criteria); var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value); reader.Parameters.Add(result); reader.ExecuteReader(); return(reader); }
/// <summary> /// /// </summary> /// <param name="criteria"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> internal bool Delete(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var deleted = MembershipUsersGateway.Delete(criteria, connection, transaction); return (0 <= deleted); }
/// <summary> /// /// </summary> /// <param name="criteria"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> internal bool Delete(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var deleted = MembershipUsersGateway.Delete(criteria, connection, transaction); return(0 <= deleted); }
/// <summary> /// /// </summary> /// <param name="entity"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public static int Delete(MembershipUsersCriteria criteria, DbConnection connection, DbTransaction transaction) { var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction); command.CommandText = @"usp_DeleteMembershipUsers"; KandaDbDataMapper.MapToParameters(command, criteria); var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value); command.Parameters.Add(result); command.ExecuteNonQuery(); return (int)result.Value; }