Does Linq to SQL or Linq to Entities 4.0 support a hierarchical data type?

Is their way of using linq for SQL / Entities 4.0 to work with a hierarchical data type?

+5
source share
3 answers

None of Microsoft's ORM families currently use CLR User-Defined Types (including built-in hierarchyidand geospatial types) as column types.

If you use them in your database, you have two ways:

  • CAST(hid AS varbinary892)). ( ), Linq. .

    , "" hierarchyid , Microsoft.SqlServerTypes BinaryReader/BinaryWriter BLOB / SqlHierarchyId.

    , Linq . , " ". , .

  • , , , hierarchyid L2S/EF. hierarchyid . UDF , .

    , , . Microsoft hierarchyid, , . hierarchyid .

    , , , hierarchyid , Dennis, . , hierarchyid , .

    Microsoft - hierarchyid ORM, hierarchyid. , hierarchyid, ( "" ), SQL UDF .

+9

, . , . ,

0

Aaronaught Linq to SQL.

    TreeId.ToString()

    [TreeId].[GetAncestor](1).ToString()

.

, Dbml .

.

0

All Articles