subsonic

Dapper(一) 简介和性能

ε祈祈猫儿з 提交于 2021-01-04 17:41:38
Dapper的简介   Dapper是.NET下一个micro的ORM,它和Entity Framework或Nhibnate不同,属于轻量级的,并且是半自动的。Dapper只有一个代码文件,完全开源,你可以放在项目里的任何位置,来实现数据到对象的ORM操作,体积小速度快。 使用ORM的好处是增、删、改很快,不用自己写sql,因为这都是重复技术含量低的工作,还有就是程序中大量的从数据库中读数据然后创建model,并为model字段赋值。这些ORM都可以轻松给你搞定。ORM给我们开发带来便利时,性能也是一个让我们不得不考虑的问题。一般的ORM性能和直接写原生的sql比都差不少,但是Dapper性能还很错,甚至和DbHelperSQL方式性能高出很多。 Dapper的优势 Dapper是一个轻型的ORM类。代码就一个SqlMapper.cs文件,编译后体积小。 Dapper很快。Dapper的速度接近与IDataReader,取列表的数据超过了DataTable。 Dapper支持多数据库。诸如:Mysql,SqlLite,Mssql系列,Oracle等一系列的数据库。 Dapper的R支持多表并联的对象。支持一对多 多对多的关系。并且没侵入性,想用就用,不想用就不用,无XML无属性,代码以前怎么写现在还怎么写。 Dapper原理通过Emit反射IDataReader的序列队列

SubSonic with MS SQL 2008?

佐手、 提交于 2020-03-19 06:06:31
问题 I have been using subsonic with MS SQL 2005 for about a year now. For those of you who have moved to SQL 2008, is subsonic compatiable with that? Have you had too many issues with SubSonic with SQL 2008? Just trying to get a feel if I should upgrade to SQL 2008 at this time or not. Thanks 回答1: I've not used SQL2008 myself, but I know there is still a bug in SubSonic 2.1 and 2.2 in handling the new date only and time only data types (it sees them as strings). 回答2: SubSonic works great with Sql

SubSonic with MS SQL 2008?

淺唱寂寞╮ 提交于 2020-03-19 06:06:23
问题 I have been using subsonic with MS SQL 2005 for about a year now. For those of you who have moved to SQL 2008, is subsonic compatiable with that? Have you had too many issues with SubSonic with SQL 2008? Just trying to get a feel if I should upgrade to SQL 2008 at this time or not. Thanks 回答1: I've not used SQL2008 myself, but I know there is still a bug in SubSonic 2.1 and 2.2 in handling the new date only and time only data types (it sees them as strings). 回答2: SubSonic works great with Sql

How can we integrate jQuery autocomplete using asp.net, webservice and sql database?

时光毁灭记忆、已成空白 提交于 2020-01-21 06:05:36
问题 I am trying to implement the code given for "jQuery Autocomplete and ASP.NET", but unable to integrate it because you are using subsonic to query database. So can you tell me how to query sqldatabase and bind the query result to the plugin from webservice in asp.net using C#? 回答1: This is a pretty easy task, the catch is that the jQuery autocomplete extender expects an array of values. Here is example of how I parse the standard XML results from a ASMX web serivce to use with the jQuery

How can we integrate jQuery autocomplete using asp.net, webservice and sql database?

眉间皱痕 提交于 2020-01-21 06:02:45
问题 I am trying to implement the code given for "jQuery Autocomplete and ASP.NET", but unable to integrate it because you are using subsonic to query database. So can you tell me how to query sqldatabase and bind the query result to the plugin from webservice in asp.net using C#? 回答1: This is a pretty easy task, the catch is that the jQuery autocomplete extender expects an array of values. Here is example of how I parse the standard XML results from a ASMX web serivce to use with the jQuery

SubSonic 3 and multiple PK columns

冷暖自知 提交于 2020-01-20 08:50:07
问题 I'm having problem with SubSonic 3 and multiple Primary Key columns. It seems like it isn't supported via the ActiveRecord T4 script. In line 173 of Settings.ttinclude return this.Columns.SingleOrDefault(x=>x.IsPK) ?? this.Columns[0]; It tries to get a Single Primary Key Column and failed. Any solutions? 回答1: Many ORM products do not support composite keys due to the overwhelming complexity of doing so. As far as I know, NHibernate is the only well-known .Net ORM product that does. Mindscape

In Subsonic 2.1 how do I make this generic call take one generic parameter?

不问归期 提交于 2020-01-16 19:19:12
问题 Using Subsonic 2.1 I want to make my method call to results look like this: results(searchCriteria) right now I have to pass the CollectionType as well as the type. Animal searchCriteria = GetSearchCritera(); AnimalCollection results = results<Animal, AnimalCollection>(searchCriteria); // I want the call to be results(searchCriteria); Here is the results method that I want to just take Y public static T results<Y, T>(Y searchCriteria) where Y: ReadOnlyRecord<Y>, new() where T: ReadOnlyList<Y,

In Subsonic 2.1 how do I make this generic call take one generic parameter?

我怕爱的太早我们不能终老 提交于 2020-01-16 19:17:28
问题 Using Subsonic 2.1 I want to make my method call to results look like this: results(searchCriteria) right now I have to pass the CollectionType as well as the type. Animal searchCriteria = GetSearchCritera(); AnimalCollection results = results<Animal, AnimalCollection>(searchCriteria); // I want the call to be results(searchCriteria); Here is the results method that I want to just take Y public static T results<Y, T>(Y searchCriteria) where Y: ReadOnlyRecord<Y>, new() where T: ReadOnlyList<Y,

Subsonic query to determine if value starts with numeric

大城市里の小女人 提交于 2020-01-15 15:31:36
问题 This is a follow-up of this question, however the context has changed. Breaking the accepted solution. This time I'm trying to use SubSonic, but it throws an errormessage using the previous accepted solution System.NotSupportedException: The method 'get_Chars' is not supported ... Line 36: char[] nums = "0123456789".ToCharArray(); Line 37: Line 38: var b = repository.GetAll().Where(q => nums.Contains(q.BrukerIdent[0])).ToList(); Line 39: Line 40: As far as I can tell q.BrukerIdent is a string

Subsonic query to determine if value starts with numeric

青春壹個敷衍的年華 提交于 2020-01-15 15:31:02
问题 This is a follow-up of this question, however the context has changed. Breaking the accepted solution. This time I'm trying to use SubSonic, but it throws an errormessage using the previous accepted solution System.NotSupportedException: The method 'get_Chars' is not supported ... Line 36: char[] nums = "0123456789".ToCharArray(); Line 37: Line 38: var b = repository.GetAll().Where(q => nums.Contains(q.BrukerIdent[0])).ToList(); Line 39: Line 40: As far as I can tell q.BrukerIdent is a string