Skip to content

Instantly share code, notes, and snippets.

@cathode
Created August 8, 2016 15:48
Show Gist options
  • Save cathode/0d95e7378f661afded4a90aebf27656b to your computer and use it in GitHub Desktop.
Save cathode/0d95e7378f661afded4a90aebf27656b to your computer and use it in GitHub Desktop.
[DbFunction("dbo", "linking_LinkProcessingContextDetail")]
public virtual IQueryable<LinkProcessingContext> GetLinkProcessingContextDetail(LinkEnvironment environmentId, int applicationId)
{
var environmentIdParameter = new System.Data.Entity.Core.Objects.ObjectParameter("EnvironmentId", environmentId);
var applicationIdParameter = new System.Data.Entity.Core.Objects.ObjectParameter("ApplicationId", applicationId);
return ((IObjectContextAdapter)this).ObjectContext
.CreateQuery<LinkProcessingContext>(
"[dbo].[linking_LinkProcessingContextDetail](@EnvironmentId, @ApplicationId)",
environmentIdParameter,
applicationIdParameter);
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ComplexType<LinkProcessingContext>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment