We are working with a rather large model in a EF 6.1 code first setup and we are using ints for entity ids.
Unfortunately, this is not as typesafe as we would like, sinc
Not sure that this will work in EF but one thing you could do is to have your entities implement IEquatable
:
For example your Blog
class:
public class Blog : IEquatable
{
// other stuff
public bool Equals(Blog other)
{
return this.Id.Equals(other.Id);
}
}
Alternatively you could use a more flexible ORM such as NHibernate. If this is of interest, let me know and I'll expand my answer.