开发者

Is there a CLR data type to Sql data type translation method?

I was going through the MVC material over at asp.net, and came across the 5 minute introduction video:

http://www.asp.net/mvc/videos/5-minute-introduction-to-aspnet-mvc

In this video, there was demonstration of creating a model, then having MVC generate a Sql table based on the object/model automatically.

My question is, what mechinism is used to translate the object's CLR datatypes to Sql Server data开发者_运维百科types?

I'd like to create a quick and dirty method to have similar functionality outside of MVC... something as simple as a method returning a Create Table string.


Like this maybe?

MSDN - Mapping CLR Parameter Data

Or this?

MSDN - SQL-CLR Type Mapping (LINQ to SQL)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜