Skip to content

Commit ce9a9ba

Browse files
Merge pull request #34 from nikitasavinov/patch-1
Update README.md
2 parents fcbac03 + 08c50d5 commit ce9a9ba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ EntityFrameworkExtras provides some useful additions to EntityFramework such as
3333

3434
* Define a stored procedure class
3535

36-
~~~
36+
~~~ csharp
3737
[StoredProcedure("storedproc_AddMemberWithAddresses")]
3838
public class AddMemberStoredWithAddressesProcedure
3939
{
40-
[StoredProcedureParameter(SqlDbType.NVarChar, ParameterName = "ForeName")]
40+
[StoredProcedureParameter(SqlDbType.NVarChar, ParameterName = "ForeName")]
4141
public string FirstName { get; set; }
4242

4343
[StoredProcedureParameter(SqlDbType.NVarChar,ParameterName = "SurName")]
@@ -54,7 +54,7 @@ public class AddMemberStoredWithAddressesProcedure
5454

5555
* A User Defined Table Type parameter is declared as a List<> (List<Address>). The UDT will also require some attributes:
5656

57-
~~~
57+
~~~ csharp
5858
[UserDefinedTableType("udt_Address")]
5959
public class Address
6060
{
@@ -71,7 +71,7 @@ public class Address
7171

7272
* Execute the Stored Procedure with either a DbContext or an ObjectContext
7373

74-
~~~
74+
~~~ csharp
7575
DbContext context = new DbContext("ConnectionString");
7676

7777
var proc = new AddMemberStoredWithAddressesProcedure()
@@ -94,7 +94,7 @@ context.Database.ExecuteStoredProcedure(proc);
9494

9595
* To add an Output parameter you just need to set the Direction parameter to ParameterDirection.Output.
9696

97-
~~~
97+
~~~ csharp
9898
[StoredProcedure("storedProc_GetOldestAge")]
9999
public class GetOldestAgeStoredProcedure
100100
{
@@ -105,7 +105,7 @@ public class GetOldestAgeStoredProcedure
105105

106106
* Execute the Stored Procedure and the parameter will be set to the output parameter value
107107

108-
~~~
108+
~~~ csharp
109109
var proc = new GetOldestAgeStoredProcedure();
110110

111111
context.Database.ExecuteStoredProcedure(proc);

0 commit comments

Comments
 (0)