subsonic3

Give an example of using subsonic 3

ⅰ亾dé卋堺 提交于 2019-12-02 13:43:26
Give me please an example on how to use subsonic 3 for: insert, select, update, delete, stored procedure usage. I am a new user of subsonic and dont know how to use it. Please explain it to me because I can not find the documentation about this. Subsonic has great documentation including screencasts. Have a look: http://subsonicproject.com/docs/Main_Page 来源: https://stackoverflow.com/questions/6138243/give-an-example-of-using-subsonic-3

Subsonic 3 Union Possible?

こ雲淡風輕ζ 提交于 2019-12-02 12:59:48
问题 I have a schema like so. Menu->Pages->PageRoles->ASPNetRoles Menu has a CategoryID. I want to return all Menu items with a CategoryID of 6. Some Menu items have a foreigh key of PageID. Pages can have 1 or more roles against them. I can check the currently logged in users roles and make sure that they are in the results by joining the tables. I want to return all Menu items with a CategoryID of 6 and for those that have PageID's the users role must be in those roles assigned to the page. The

SubSonic3: Method “FirstOrDefault” throws exception with SQL Server 2000

旧巷老猫 提交于 2019-12-02 11:58:14
I am using SubSonic3 with SQL Server 2000. I have problem with the method "FirstOrDefault" - it always throws an exception = "Line 1: Incorrect syntax near '('." from the SubSonic.Linq dll EDIT (Added code from comment): InventoryDAL = DAL project name (dll) Inventort= Subsonic3 Gnerated classes Name space WHWarehouses = gnerated object Dim WareH = (From Wh In InventoryDAL.Inventort.WHWarehouses.All _ Where Wh.WarehouseID = 1 ).FirstOrDefault I don't know SubSonic, but Hibernate has different dialects of SQL you can tell it to use, might want to see if there is any way to tell it to use a

Subsonic 3 Union Possible?

不打扰是莪最后的温柔 提交于 2019-12-02 05:54:10
I have a schema like so. Menu->Pages->PageRoles->ASPNetRoles Menu has a CategoryID. I want to return all Menu items with a CategoryID of 6. Some Menu items have a foreigh key of PageID. Pages can have 1 or more roles against them. I can check the currently logged in users roles and make sure that they are in the results by joining the tables. I want to return all Menu items with a CategoryID of 6 and for those that have PageID's the users role must be in those roles assigned to the page. The only way I can think is to do a union but when I do this in Subsonic it fails. The following works. var

Subsonic 3 + LINQ bug

无人久伴 提交于 2019-12-02 05:29:39
A weird bug with Subsonic 3.0.0.3 Using - as an example - AdventureWorksLT DB When I run this code I get null for gname (although name gets the value ok) And w is 0 instead of the value in the 1st row [If I change select new MyData to just select MyData - it works OK] class Program { static void Main(string[] args) { var q = from g in Product.All() select new MyData{ gname = g.Name, name = g.Name, w = g.Weight.Value }; var list00 = q.Take(1).ToList(); Console.WriteLine(list00[0].gname); } } public class MyData { public string gname { get; set; } public string name { get; set; } public decimal

Subsonic 3 Linq Projection Issue

 ̄綄美尐妖づ 提交于 2019-12-02 03:32:37
OK I'm banging my head against a wall with this one ;-) Given tables in my database called Address, Customer and CustomerType, I want to display combined summary information about the customer so I create a query to join these two tables and retrieve a specified result. var customers = (from c in tblCustomer.All() join address in tblAddress.All() on c.Address equals address.AddressId join type in tblCustomerType.All() on c.CustomerType equals type.CustomerTypeId select new CustomerSummaryView { CustomerName = c.CustomerName, CustomerType = type.Description, Postcode = address.Postcode });

Subsonic 3 SimpleRepository NON Plural Table names?

大城市里の小女人 提交于 2019-12-02 03:09:09
Is it possible to use SubSonic 3's Simple Repository with non-plural table names? My DB already exists, the table names a re singular add I cannot change them. Nope, it is hardcoded in the SubSonic's source. You can pull it down and trace the migration steps to see where the plural happens. I know, cause I wanted the same thing. I was tinkering with modifying the source to make plurals optional via some parameter/config override or alike. But, I didn't get it completed (yet). If your tables already exist then this is not the intended use of the Simple Repository model. The simple repository

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

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