-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out testing for EF use of Microsoft.SqlServer.Types #10108
Comments
…n .NET Framework Part of issue #1100 This change allows properties of type SqlGeography, SqlGeometry, and HierarchyId to be included in entity classes and mapped by convention to corresponding database columns. WARNING: This is by no-means full spatial support for EF Core. These are the important limitations: * It only works when running on .NET Framework. It will not work on .NET Core, since SqlClient for .NET Core does not support these types. * Query support is limited: * LINQ queries that don't use the semantics of the SQL types should work. * Queries that need to use the type semantics (e.g. using STDistance) can be done with FromSql queries, but not LINQ * See issue #10108 for some test code and issue #10109 for some ideas to make LINQ work better * The SQL Server spatial types do not provide a good client-side programming experience. A proper .NET spatial library is needed for a good, cross-platform experience. Note that this change also allows more general mapping of types not directly referenced from the provider, and more specifically UDTs on SQL Server.
Seperate .net fw test project, and privately deploy the libraries (as content) ? |
Triage: we will put this code into a sample. |
…n .NET Framework Part of issue #1100 This change allows properties of type SqlGeography, SqlGeometry, and HierarchyId to be included in entity classes and mapped by convention to corresponding database columns. WARNING: This is by no-means full spatial support for EF Core. These are the important limitations: * It only works when running on .NET Framework. It will not work on .NET Core, since SqlClient for .NET Core does not support these types. * Query support is limited: * LINQ queries that don't use the semantics of the SQL types should work. * Queries that need to use the type semantics (e.g. using STDistance) can be done with FromSql queries, but not LINQ * See issue #10108 for some test code and issue #10109 for some ideas to make LINQ work better * The SQL Server spatial types do not provide a good client-side programming experience. A proper .NET spatial library is needed for a good, cross-platform experience. Note that this change also allows more general mapping of types not directly referenced from the provider, and more specifically UDTs on SQL Server.
Verified that test code still works on current bits. Closing this as remaining work is to document and move to a sample, which is covered by dotnet/EntityFramework.Docs#611 |
When I try to use SqlHierarchyId in one of my classes and then add-migration, i get the error: I am using EF Core 2.1 with ASPNetCore 2.1 while targeting .net 4.7.1 Any ideas what I need to do to add a column that uses SqlHierarchyId to my existing entity? Thanks |
@KyleTraynor Thanks for reporting this--filed as a new issue #12192 |
Testing for Microsoft.SqlServer.Types is problematic because:
For now I have been using this little test app for most of my functional testing:
The text was updated successfully, but these errors were encountered: