[CSharp/en]Fixed compilation and ef errors

This commit is contained in:
Laoujin 2015-01-31 20:42:27 +01:00
parent 937e6dad51
commit 012a4a8e90

View File

@ -26,7 +26,7 @@ Multi-line comments look like this
// Specify namespaces application will be using // Specify namespaces application will be using
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Entity; using System.Data.Entity; // Add dll reference with NuGet: Install-Package EntityFramework
using System.Dynamic; using System.Dynamic;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
@ -684,7 +684,7 @@ on a new line! ""Wow!"", the masses cried";
// All though this is not entirely useful in this example, you // All though this is not entirely useful in this example, you
// could do bicycle[0] which yields "chris" to get the first passenger or // could do bicycle[0] which yields "chris" to get the first passenger or
// bicycle[1] = "lisa" to set the passenger. (of this apparent quattrocycle) // bicycle[1] = "lisa" to set the passenger. (of this apparent quattrocycle)
private string[] passengers = { "chris", "phil", "darren", "regina" } private string[] passengers = { "chris", "phil", "darren", "regina" };
public string this[int i] public string this[int i]
{ {
@ -786,7 +786,7 @@ on a new line! ""Wow!"", the masses cried";
/// EntityFramework Code First is awesome (similar to Ruby's ActiveRecord, but bidirectional) /// EntityFramework Code First is awesome (similar to Ruby's ActiveRecord, but bidirectional)
/// http://msdn.microsoft.com/en-us/data/jj193542.aspx /// http://msdn.microsoft.com/en-us/data/jj193542.aspx
/// </summary> /// </summary>
public class BikeRepository : DbSet public class BikeRepository : DbContext
{ {
public BikeRepository() public BikeRepository()
: base() : base()