Skip to content

Instantly share code, notes, and snippets.

Class Create Many Without Validations Or Callbacks (11.9ms) INSERT INTO `wiki_views` (`id`,`timestamp`,`source`,`count`,`parent_id`,`parent_type`,`created_at`,`updated_at`,`partial`) VALUES (NULL,'2015-06-29 00:00:00.000000','wiki_media',866,452,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',2821,457,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',1382,459,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',20153,925,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',620,945,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',939,949,'Movie','2015-07-01 16:24:33.526133','2015-07-01 16:24:33.526167',0),(NULL,'2015-06-29 00:00:00.000000','wiki_media',578,950,'Movie','2015-07-01 1
@branliu0
branliu0 / queries.cs
Last active December 30, 2016 07:56
Comparing deferred execution for IQueryable, IEnumerable, and IList
void Main()
{
IQueryable<C_Patient> queryable = C_Patient.AsQueryable();
IEnumerable<C_Patient> enumerable = C_Patient.AsEnumerable();
// Expensive execution triggered here.
IList<C_Patient> list = C_Patient.ToList();
// Cheap SQL query: Does the Count in SQL.

Keybase proof

I hereby claim:

  • I am thenovices on github.
  • I am branliu (https://keybase.io/branliu) on keybase.
  • I have a public key ASA1gWOxzfVAgHmVArUxMvgvn3eoVleSfVxL41x1ROLXigo

To claim this, I am signing this object: