I have a model with a primary key made up of two columns in it
public class UserSite
{
[Key]
[Column(Order = 1)]
public string User_Name { get; set; }
[Key]
[Column(Order = 2)]
public string Site_Code { get; set; }
public bool Default_site { get; set; }
public DateTime Last_Modified { get; set; }
}
Now I want to update a record. I am using a generic repository concept.
public void Edit(TEntity entity)
{
context.Entry(entity).State = EntityState.Modified;
Save();
}
When I try to call this edit using unit of work iam getting the following error
An unhandled exception of type 'System.StackOverflowException' occurred.
Please help
Thanks in advance