I am learning the Entity Framework and I decided to create a simple console application that uses Entity framework with two tables.
I've created two tables: http://wstaw.org/w/LrL/
I have appropiate classes for the database.
This is the code.
The Contact class.
public class Contact
{
public int ContactID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public ICollection<Address> Addresses { get; set; }
}
And the Address class.
public class Address
{
public int AddressID { get; set; }
public string Street { get; set; }
public string City { get; set; }
}
Visual studio shows Following Errors.
Error 3 Missing partial modifier on declaration of type 'MyEntityPOCO.Contact'; another partial declaration of this type exists Contact.c 8 19 MyEntityPOCO
Error 4 Missing partial modifier on declaration of type 'MyEntityPOCO.Address'; another partial declaration of this type exists Address.cs 8 19 MyEntityPOCO
Error 1 Running transformation: Please overwrite the replacement token '$edmxInputFile$' with the actual name of the .edmx file you would like to generate from. MyEntityPOCO\Model1.tt 1 1
How might I resolve these errors?