sobota 16. října 2010

int == System.Int32. Or not?

So they say int is an alias to System.Int32, right? So I should be able to use one where ever I use the other, right? Or not?

Try this:

public enum AddressTypes : System.Int32 { Delivery = 1, Invoicing = 2};


Error 89 Type byte, sbyte, short, ushort, int, uint, long, or ulong expected D:\...\DataModel\DB.Designer2.cs 799 34 DataModel

Oh Microsoft, how I love thee.
So the Entity Framework dutifully converts the database type to the .Net type, I take the type, use it in generated code and kaboooom. Thank you!

Žádné komentáře: