For example in my Model.edmx file I have:
<Schema Namespace="dbModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
<EntityContainer Name="dbModelStoreContainer">
<EntitySet Name="Students" EntityType="dbModel.Store.Students" store:Type="Tables" Schema="dbo" />
<EntitySet Name="Teachers" EntityType="dbModel.Store.Teachers" store:Type="Tables" Schema="dbo" />
</EntityContainer>
<EntityType Name="Students">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Name" Type="nvarchar(max)" Nullable="false" />
<Property Name="TeacherId" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="Teachers">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Name" Type="nvarchar(max)" Nullable="false" />
</EntityType>
<Function Name="ListAllStudents" IsComposable="false">
<CommandText>
select * from student
WHERE teacherid = @id;
</CommandText>
<Parameter Name="id"
Mode="In"
Type="int"/>
</Function>
</Schema>
Is it possible for
<Function Name="ListAllStudents" IsComposable="false">
<CommandText>
select * from student
WHERE teacherid = @id;
</CommandText>
<Parameter Name="id"
Mode="In"
Type="int"/>
</Function>
to live outside of the Model.edmx and reference it? What I want to do is similar in nature to breaking out the different web.config sections into their own XML file. I don't want to make the EDMX file huge for a project since I will have quite a few defined queries.
**EDIT: Code First is not really a liable options since I will be working with a (legacy) database already defined.