Requires EntityFramework.dll.

When creating an Entity Framework model, several options are available:

Architecture

DbModelBuilder

Exists within the System.Data.Entity namespace, DbModelBuilder maps classes to a database schema. It could be used for the 'code first' method, or generated by building a 'database first' Entity Framework model. Here the model can be configured by overriding the DbContext.

The DbModelBuilder class contains:

Sending Data to Stored Procedures

The following code is found in [DatabaseName].Context.cs:
public virtual ObjectResult prStoredProcedure(Nullable noOfDays)
{
var noOfDaysParameter = noOfDays.HasValue ?
new ObjectParameter("NoOfDays", noOfDays) :
new ObjectParameter("NoOfDays", typeof(int));

return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("prStoredProcedure", noOfDaysParameter);
}

Return Data

public partial class prStoredProcedure_Result
{
public Nullable Id { get; set; }
public string HealthBoard { get; set; }
public string HealthBoardDescription { get; set; }
public Nullable MessagesProcessed { get; set; }
}

References

ENTITYFRAMEWORKTUTORIAL.NET. 2016. Entity Framework Tutorial. [WWW]. www.entityframeworktutorial.net. 21st April 2017.