How to map column and entity propery of different datatypes in entity framework code first

后端 未结 5 1260
北恋
北恋 2020-12-10 14:33

I am using Entity Framework 5 - Code first.

I have a database that I am connecting to that already exists for some time now (I did not create it). There is a table

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 15:07

    You can convert it to an int with:

     int myInt = Convert.Int32(numberFromDatabase);
    

提交回复
热议问题