[Serializable]
public abstract class Entity
{
public Entity()
{
}
public Entity(int id)
{
this.Id = id;
}
public virtual int Id { get; set; }
public override bool Equals(object obj)
{
Entity other = (Entity)obj;
return this.Id == other.Id;
}
public override int GetHashCode()
{
return this.Id.GetHashCode();
}
}
Showing posts with label Enumerable. Show all posts
Showing posts with label Enumerable. Show all posts
Saturday, January 18, 2014
Error for enumerable when using JsonConvert.SerializeObject
Labels:
ASP.NET,
C#.NET,
Enumerable,
Error,
JsonConvert
Subscribe to:
Posts (Atom)