subsonic

Subsonic 3.0 and linq

▼魔方 西西 提交于 2019-12-01 06:58:45
问题 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

How to get into SubSonic?

孤街醉人 提交于 2019-12-01 04:08:07
A month ago I searched for some tools that will generate C# classes out for my SQL database/tables. So I don't have to write DAL classes manually and to save a lot of time. I came across "ORM" and subsonic. I watched the webcasts on the homepage http://subsonicproject.com/ and was pretty impressed by it. But I am still missing more documentation/knowledge to feel comfortable with subsonic to use it in our projects. Today I read about the "migration" feature somewhere - accidental. How to get into subsonic? How to get more comfortable with it? How to know about all the features/possibilities it

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

荒凉一梦 提交于 2019-12-01 02:11:56
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#? 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 autocomplete extender. Since ASP.NET likes to rewrite your ID's, you can pass in the ClientID to get the dynamic

SubSonic 3 Linq projecting anonymous types but not class types

て烟熏妆下的殇ゞ 提交于 2019-12-01 01:54:58
I am fairly new to SubSonic 3/Linq, and don't know if I'm missing something obvious, but I think I ran into a projection issue. I am trying to perform the most basic query, and getting back proper results only when I use anonymous types. The moment I swap the anonymous types with regular class types, I get all properties set to null/zero. I am crafting a DAL class library, so unfortunately anonymous types are not an option. Snippet using System; using System.Linq; using Fruits.Data; namespace FruitTest { class Program { static void Main(string[] args) { var db = new FruitsDB(); var fruits =

SubSonic 3 Linq projecting anonymous types but not class types

自作多情 提交于 2019-11-30 21:21:07
问题 I am fairly new to SubSonic 3/Linq, and don't know if I'm missing something obvious, but I think I ran into a projection issue. I am trying to perform the most basic query, and getting back proper results only when I use anonymous types. The moment I swap the anonymous types with regular class types, I get all properties set to null/zero. I am crafting a DAL class library, so unfortunately anonymous types are not an option. Snippet using System; using System.Linq; using Fruits.Data; namespace

.NET ORM solution with class auto-generation: Subsonic, Castle AR, …?

为君一笑 提交于 2019-11-30 19:48:14
I used to work with a custom data mapping library, and curently I'm trying to switch to a more widespread ORM solution. After some experimentation, I refined my requirements to the following: able to generate usable classes from database schema (SQL Server support is enough), support for ActiveRecord pattern, programmaticaly configurable (via code or attributes, no HBM files), free. Could you please recommend one? So far I have tried: Subsonic 3.0 The one I currently like most, as it feels like a good balance between functionality and simplicity. What I don't like: uses IQueryable<> and plural

Is Subsonic compatible with .Net 4.0

我的梦境 提交于 2019-11-30 17:29:37
问题 Is the latest version of Subsonic compatible with Visual Studio 2010 / .Net 4.0? 回答1: I've had version 3 working in the beta version of Visual Studio 2010 and .net 4 for a while now. It works just fine. 回答2: Yes, the Subsonic 3 should work fine in .NET 4. I am developing a solution on VS.NET 2010 using Subsonic 3 and so far no problems at all. 回答3: Subsonic is just a 3.5 library.... whether you have .net 4.0 or .net X.X in the future it should still compile to 3.5... just as a .Net 2.0

Is SubSonic dying

匆匆过客 提交于 2019-11-30 12:43:47
I'm real interested in using SubSonic, I've downloaded it and I'm enjoying it so far, but looking at the activity on github and googlegroups it doesn't seem to be very active and looks a lot like a project that's dying. There's no videos about it on tekpub and Rob seems to be using nHibernate for all his projects these days. I don't want to focus on learning SubSonic and integrating it into my projects if it's not going to live much longer. So my question is what's happening with subsonic development, is there a new release imminent is there lots going on behind the scenes or is it as inactive

Subsonic 3 - SimpleRepository

北慕城南 提交于 2019-11-28 09:27:00
I am playing around with Subsonic 3's simple repository and am hitting walls in understanding how to deal with foreign keys... If I have a product object containing int ID; string name; string description; Category category; int categoryID (this one is just to persist the product's categoryID to the DB) and a category object containing int ID; string name; How can I use the repository to bring back a list of all products with their category object instantiated? At the moment I have written a linq query which joins on product.categoryID = category.ID which is all well and good, but when I

Adding DataAnnontations to Generated Partial Classes

倖福魔咒の 提交于 2019-11-28 07:04:21
I have a Subsonic3 Active Record generated partial User class which I've extended on with some methods in a separate partial class. I would like to know if it is possible to add Data Annotations to the member properties on one partial class where it's declared on the other Subsonic Generated one I tried this. public partial class User { [DataType(DataType.EmailAddress, ErrorMessage = "Please enter an email address")] public string Email { get; set; } ... } That examples gives the "Member is already defined" error. I think I might have seen an example a while ago of what I'm trying to do with