subsonic

Is connection pooling working correctly in Subsonic?

为君一笑 提交于 2019-12-02 04:25:00
I am getting reports that connection pooling is not working in the Subsonic orm when used with sql server on a remote machine. I'm not sure how they are monitoring this, maybe with the profiler. Subsonic opens late, closes early as you are supposed to do in an orm layer, but is there any problem with the implementation that would cause too many connections? There is a way for a connection to remain open when using SubSonic. Many people assume that when you load a collection the reader will be closed for you - but it's not (a class should never act on another class without permission). There is

subsonic 3 scaffolding

五迷三道 提交于 2019-12-02 01:41:05
Are there the asp.net scaffolding controls (ex: < subsonic:QuickTable />) still available in subsonic 3? No - we did that the best we could with 2.2 :) Not Subsonic related, but Dynamic Data is something you might want to look into. Dynamic Data Information There is no more scaffolding feature anymore. Subcommander also is abandoned. 来源: https://stackoverflow.com/questions/1082667/subsonic-3-scaffolding

Subsonic Access To App.Config Connection Strings From Referenced DLL in Powershell Script

纵然是瞬间 提交于 2019-12-02 00:45:29
问题 I've got a DLL that contains Subsonic-generated and augmented code to access a data model. Actually, it is a merged DLL of that original assembly, Subsonic itself and a few other referenced DLL's into a single assembly, called "PowershellDataAccess.dll. However, it should be noted that I've also tried this referencing each assembly individually in the script as well and that doesn't work either. I am then attempting to use the objects and methods in that assembly. In this case, I'm accessing

Subsonic: Using SharedDbConnectionScope together with TransactionScope seems to be broken

◇◆丶佛笑我妖孽 提交于 2019-12-02 00:11:07
问题 Using the code below, the expected behavior is that the database won't reflect the update since ts.Complete() is never called but the updates seems to go through. But if I leave out the SharedDbConnectionScope then the expected behavior is seen. Is there a problem with SharedDbConnectionScope? Btw I am using Subsonic 2.2 using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope()) { using (TransactionScope ts = new TransactionScope()) { // update here } } 回答1: Found

Subsonic Access To App.Config Connection Strings From Referenced DLL in Powershell Script

こ雲淡風輕ζ 提交于 2019-12-01 22:21:11
I've got a DLL that contains Subsonic-generated and augmented code to access a data model. Actually, it is a merged DLL of that original assembly, Subsonic itself and a few other referenced DLL's into a single assembly, called "PowershellDataAccess.dll. However, it should be noted that I've also tried this referencing each assembly individually in the script as well and that doesn't work either. I am then attempting to use the objects and methods in that assembly. In this case, I'm accessing a class that uses Subsonic to load a bunch of records and creates a Lucene index from those records.

Subsonic: Using SharedDbConnectionScope together with TransactionScope seems to be broken

两盒软妹~` 提交于 2019-12-01 20:15:42
Using the code below, the expected behavior is that the database won't reflect the update since ts.Complete() is never called but the updates seems to go through. But if I leave out the SharedDbConnectionScope then the expected behavior is seen. Is there a problem with SharedDbConnectionScope? Btw I am using Subsonic 2.2 using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope()) { using (TransactionScope ts = new TransactionScope()) { // update here } } Found out the problem. The docs on Subsonic appears to be wrong. If I wrap TransactionScope over

Use subsonic 3.0 SimpleRepository to a existing database

吃可爱长大的小学妹 提交于 2019-12-01 20:13:27
问题 I want to use subsonic 3.0 SimpleRepository in my project, but there is a problem : If my table's name like Product etc. then I can't get any data from database, because subsonic generate the sql statement like " Select * from Products ... " PS: I don't want to change my table name. I wrote a t4 template to solve this problem, I hope someone can take a look at my code and tell me am i do the right thing? Code: SimpleRepositoryDemo 回答1: It sounds like you already have a database designed in

Use subsonic 3.0 SimpleRepository to a existing database

筅森魡賤 提交于 2019-12-01 18:40:04
I want to use subsonic 3.0 SimpleRepository in my project, but there is a problem : If my table's name like Product etc. then I can't get any data from database, because subsonic generate the sql statement like " Select * from Products ... " PS: I don't want to change my table name. I wrote a t4 template to solve this problem, I hope someone can take a look at my code and tell me am i do the right thing? Code: SimpleRepositoryDemo It sounds like you already have a database designed in which case I would suggest you use the LinqTemplates or ActiveRecord instead. SimpleRepository seems to really

SubSonic 3 and MySQL, removing underscore from column name in CleanUp() method causes exceptions when using property in linq-query

血红的双手。 提交于 2019-12-01 14:39:11
I've run into a problem when using SubSonic 3(.0.0.3) ActiveRecord with MySQL. Since MySQL doesn't allow you to use uppercase letters in table or column names (or rather disregards it if you do) I decided to separate words using underscores, e.g. entity_id, and then use the CleanUp() method to add title casing and remove the underscores. A friend wrote a ToTitleCase(string s) method that looks like this: string ToTitleCase(string s) { CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture; TextInfo textInfo = cultureInfo.TextInfo; return textInfo.ToTitleCase(s); } And the CleanUp()

Subsonic 3.0 and linq

两盒软妹~` 提交于 2019-12-01 08:40:55
I'm playing around with Subsonic 3.0 SimpleRepository and try to get menus and menuitems with one linq query, but the menuitems is allways null Menu public class Menu { public Menu() { MenuId = 0; MenuName = ""; MenuItems = null; } public int MenuId { get; set; } public string MenuName { get; set; } public MenuItem MenuItems { get; set; } } Menuitem public class MenuItem { public MenuItem() { MenuItemId = 0; MenuId = 0; MenuItemName = ""; } public int MenuItemId { get; set; } public int MenuId { get; set; } public string MenuItemName { get; set; } } Linq query var menus = from m in _repo.All