Questions tagged [subsonic3]

SubSonic is A Super High-fidelity Batman Utility Belt that works up your data access (using LINQ in 3.0), throws in some much-needed utility functions, and generally speeds along your development cycle.

SubSonic is an open source project designed to act as a data access layer in your application. It was originally conceived by Rob Conery.

SubSonic is A Super High-fidelity Batman Utility Belt that works up your data access (using LINQ in 3.0), throws in some much-needed utility functions, and generally speeds along your development cycle.

Our focus is that you have better things to do with your time than worry about data access. It's a problem - we understand. But we're here to help with the addiction.

The main project website is located at http://subsonicproject.com/.

557 questions
3
votes
1 answer

Subsonic 3: SimpleRepository. How to map enum to a table column

I have a DB table (Profile) to describe a person. This table has a column "Sex" (int). In .NET part I have: public enum Sex { Male = 1, Female = 2 } public class Profile{ public int ID {get; set;} public Sex Sex {get;…
user137309
  • 31
  • 1
3
votes
3 answers

SubSonic SimpleRepository - Default Value

Hopefully there's a solution/patch to SubSonic SimpleRepository where I can specify a column/property with a default value so that it populates the DB with the default value set. I'm still reading the SubSonic Docs and just ran across that issue. …
kntcnrg
  • 603
  • 3
  • 10
  • 17
3
votes
2 answers

SubSonic 3 ActiveRecord generated code with warnings

While using SubSonic 3 with ActiveRecord T4 templates, the generated code shows many warnings about CLS-compliance, unused items, and lack of GetHashCode() implementation. In order to avoid them, I did the following modifications: //…
alexandrul
  • 12,856
  • 13
  • 72
  • 99
2
votes
2 answers

Compiling SubSonic 3.0.0.4 from sources

I downloaded SubSonic 3.0.0.4 sources from https://github.com/subsonic/SubSonic-3.0 and compiled it using Visual Studio 2010. When I add the compiled SubSonic.Core.dll to my own project and try to use the SimpleRepository like this SimpleRepository…
Bapu
  • 21
  • 2
2
votes
2 answers

System.Data.SQLite and SubSonic 3: Works great in VS2008, but not in VS2010

Last year, I used SubSonic 3 and SQLite in a VS2008 project very successfully and was quite pleased with the results. Just recently, I tried to setup SubSonic 3 and SQLite in a VS2010 project and have been met with the inner exception when trying to…
Pretzel
  • 8,141
  • 16
  • 59
  • 84
2
votes
1 answer

Subsonic and Automapper - dirtyColumns collection is empty therefore can't update

I'm using Subsonic 3 and Automapper on an asp.net MVC3 project. In my HttpPost ActionResult, I'm taking my model and mapping it to my Subsonic generated entity. The mapping works no probs, but I can't update the entity. Upon further inspection, it…
Ed Spencer
  • 462
  • 1
  • 8
  • 21
2
votes
1 answer

Inserting a new record pattern in SubSonic 3

I'm trying out the new SubSonic 3 preview, but I'm not sure about the patterns I should be using for the basic CRUD operations in my MVC project. I'm trying to keep as much of my data logic in my models, so I added some static CRUD methods to each…
user1228
2
votes
1 answer

Is the activerecord pattern built into Entity Framework 4.0?

In the past I used Sub Sonic which has the activerecord pattern baked into the framework. With Sub Sonic it was very easy to find the "dirty" fields on an update. I now have a need to create an audit table in my application that utilizes Entity…
2
votes
3 answers

Subsonic DAL fails compilation on columns which are keywords

I'm using Subsonic 3 (Active Record), VS2010, Framework 3.5 against a MySQL database. Someone named a column "string." I S@*t you not. OK, I've named some database objects some dumb names (Like naming a SQL Server table "User") before but...…
Paul
  • 21
  • 1
2
votes
1 answer

Nested linq - where x == enumerable

I'm new to Linq and SQL terminology - can someone tell me why this isn't working (syntax is not right - I can't compare u.UserID int with an Enumerable) var projectUsers = from u in SimpleRepository.All() where u.UserID ==…
George R
  • 3,784
  • 3
  • 34
  • 38
2
votes
0 answers

Complete Info for Setting Up SubSonic 3 with Oracle

I'm looking for the complete steps for setting up SubSonic 3 with Oracle 10g. I see a lot of pieces out there, but no clear list. Please correct me where I'm wrong: Create Class Library (.net 3.5) create an app.config with a valid connectionString…
aron
  • 2,856
  • 11
  • 49
  • 79
2
votes
2 answers

SubSonic ActiveRecord templates: generated code produces error converting int? to int

I just started exploring SubSonic 3's ActiveRecord, and it's initial code generation has created errors. Cannot implicitly convert type 'int?' to 'int'. An explicit conversion exists (are you missing a cast?) Here's the line it throws…
Donald Hughes
  • 6,627
  • 8
  • 35
  • 46
2
votes
1 answer

SubSonic "Save" improvement suggestion

[We are using ActiveRecord.] While running Sql Server Profiler, we noticed that a simple "Save" was preceded by a good bit of database activity. We found that the SubSonic core runs through all the properties and saves their values in a dictionary…
Kelly Cline
  • 2,206
  • 2
  • 33
  • 57
2
votes
5 answers

SQL Server lock/hang issue

I'm using SQL Server 2008 on Windows Server 2008 R2, all sp'd up. I'm getting occasional issues with SQL Server hanging with the CPU usage on 100% on our live server. It seems all the wait time on SQL Sever when this happens is given to…
Matt Roberts
  • 26,371
  • 31
  • 103
  • 180
2
votes
2 answers

Subsonic 3 ActiveRecord nested select for NotIn bug?

I have the following Subsonic 3.0 query, which contains a nested NotIn query: public List GetRandomOrdersForNoReason(int shopId, int typeId) { // build query var q = new SubSonic.Query.Select().Top("1") .From("Order") …
Rebecca
  • 13,914
  • 10
  • 95
  • 136