Esempio n. 1
0
    /// <summary>
    /// Shows how to get all records based on Search Parameters.
    /// </summary>
    private void SelectAllDynamicWhere()
    {
        // search parameters, everything is nullable, only items being searched for should be filled
        // note: fields with String type uses a LIKE search, everything else uses an exact match
        // also, every field you're searching for uses the AND operator
        // e.g. int? productID = 1; string productName = "ch";
        // will translate to: SELECT....WHERE productID = 1 AND productName LIKE '%ch%'
        int?     roleId          = null;
        string   roleDescription = null;
        DateTime?createdOn       = null;
        string   createdBy       = null;
        DateTime?modifiedOn      = null;
        string   modifiedBy      = null;

        List <RoleMaster> objRoleMasterCol = RoleMaster.SelectAllDynamicWhere(roleId, roleDescription, createdOn, createdBy, modifiedOn, modifiedBy);
    }