Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION [dbo].[CheckLocation]
- (
- @locationId Int
- )
- RETURNS bit
- AS
- BEGIN
- //code
- END
- <Function Name="CheckLocation" ReturnType="bit" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" >
- <Parameter Name="locationId" Type="int" Mode="In" />
- </Function>
- public partial class MainModelContainer
- {
- [EdmFunction("MainModel.Store", "CheckLocation")]
- public bool CheckLocation(int locationId)
- {
- throw new NotSupportedException("Direct calls not supported");
- }
- }
- Context.CheckLocation(locationId);
- var students = context.Locations
- .Select ( new { location= CheckLocation(locationId)}):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement