开发者

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

开发者 https://www.devze.com 2023-04-07 01:00 出处:网络
I was going through the MVC material over at asp.net, and came across the 5 minute introduction video:

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

精彩评论

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