score:1
For #1, There is no way, to work with schemas directly in a Linq-To-Entities query. I believe they are adding some functionality here in EF6, but I'm guessing you don't want to wait until then.
There is one work around, which I have used in SQL Server 2008, using Synonyms
(I believe PostgreSQL also has Synonym
functionality).
For example, if your table names are dbo.Address
and read.Address
, you would create a Synonym
for read.Address
, named read.Address_read
, then you would add the Synonym
to your EF datamodel, instead of the table itself. This gives you the ability to perform any and all queries against multiple schemas at once, because EF thinks these tables have different names.
Source: stackoverflow.com
Related Articles
- Linq and Entity Migrations with specific schemas in PostgreSQL
- most efficient Entity Framework Code First method of flattening / projecting parent entity with specific child
- How to use LINQ to retrieve a list from another entity with a specific number of items
- Proper Linq Query for objects with many to many relation ship generated with code first entity framework
- Entity Framework dynamic linq where from generic source with dynamic where clause
- Entity Framework EF Query using LINQ for related Entities - Getting Customers with their orders from specific period of time only
- Select a specific column in LINQ web service with Entity Framework
- How to call an Sql User defined Function using Entity frame work Code first approach with LInq c#
- Populate a list with a specific range of numbers by using LINQ
- Linq To Sql with PostgreSQL
- Cleanest Way To Map Entity To DTO With Linq Select?
- Check if a string within a list contains a specific string with Linq
- Entity Framework with LINQ aggregate to concatenate string?
- Linq orderby, start with specific number, then return to lowest
- LINQ To SQL: Delete entity (by ID) with one query
- Is an outer join possible with Linq to Entity Framework
- How to avoid memory overflow when querying large datasets with Entity Framework and LINQ
- Entity Framework - Linq query with order by and group by
- Linq to Entity Join table with multiple OR conditions
- Use a Inline Table-Valued Functions with Linq and Entity Framework Core
- How can I extract a list of Tuple from a specific table with Entity Framework / LINQ?
- Deleting multiple records with Entity Framework using a single LINQ query
- LINQ to SQL entity column name attribute ignored with guid primary key
- Trouble with Entity Framework Linq Query: runs instantly in SSMS and 8-10s in EF LINQ
- How to use a Func in an expression with Linq to Entity Framework?
- Getting stored procedure output parameter with LINQ and Entity Framework
- LINQ table join with entity Framework
- Entity Framework with Oracle using odp.net not taking parameters in linq query
- Add leading zeros with LINQ and Entity Framework
- C# Entity Framework with linq returns null reference
- How can I specify to use Linq ThenBy clause only when there is a tie?
- In a LINQ query, when calling ToDictionary, what is assigned the key and value?
- Partial linq text searching with Contains
- Averaging Elements by Array Indices in LINQ after GroupBy()
- Querying List vs ToDictionary()
- Linq select in select
- Problem with LINQ - necessary to add reference to unneeded library
- Performance difference between .RemoveAll and .Where in C#
- How to create a nested LINQ statement containing two joins
- if only one record is return linq output is wrong c#
- This overload of the method 'System.Linq.Queryable.TakeLast' is currently not supported
- Passing a groupfunction to Linq query dynamically
- C# IP List to Possible CIDR Notation?
- Can this LINQ Expression be converted from method syntax to query syntax?
- c# delete a List from a List<List<>>
- How to check if all items in an array of strings are key in a NameValueCollection?
- Entity framework GroupBy, Select min and max
- Value was either too large or too small for an Int16 ,when copy to data table
- Cleaning up multiple IF statements in the code
- How to maintain unique List Before Saving To Database? - C#