subsonic3

Subsonic 3 Guid as PK always gives me 00000000-0000-0000-0000-000000000000

Using Subsonic 3, Simple Repository the Add always gives me a 00000000-0000-0000-0000-000000000000 for my PK which obviously causes an error in my DB. I see that the definition of my PK created by Subsonic is using newid() but still having this issue. Anyone else having this problem? FYI I am using a local SQL Server 2005 DB sitting...

Why am I getting arbirary exceptions when using Subsonic 3

I have a few questions regarding Subsonic 3: Does anyone use it in their projects? Why do I keep on getting primary key exceptions when accessing tables? Why do I seem to be getting arbitrary null reference exceptions when using subsonic? ...

How to use a Class within Class in Subsonic 3

I have two classes like this (This is just for demostration): Class 1: public class Country { public Guid ID { get; private set; } public String Name {get; private set; } public List<StateProvince> StateProvinces { get; private set; } } Class 2: public class StateProvince { public Guid ID { get; private set; } public Strin...

"Lambda Parameter not in scope" exception using SimpleRepository's Single method

Hello, I'm attempting to use the SimpleRepository to perform a fetch based on a non-ID property. Here's the Customer class I'm using: [Serializable] public class Customer : IEntity<Guid> { public Guid ProviderUserKey { get; set; } public Guid ID { get; set; } } I'm using Si...

Subsonic 3 - SimpleRepository Update = Object reference not set to an instance of an object.

Seems fairly straight forward and simple, I am doing the following and getting an 'Object reference not set to an instance of an object.' error. It's a very simple update. [AcceptVerbs(HttpVerbs.Post)][Authorize(Roles="admin")][ValidateInput(false)] public ActionResult SaveContent(int id, string content) { va...

SubSonic 3.0.0.3 | SimpleRepository | DB DataType - Class DataType mapping

I am beginning to make friends with SubSonic 3.0.0.3 - SimpleRepository. Since you/I have to create every object class, so I made a simple code below, just to save some time. My only question is, does my mapping are correct (DB DataType to .Net DataType)? Here's the simple code: public string CreateClassEntity(string ConnectionSring, ...

SubSonic 3.0.0.2 Structs.tt

The error I'm getting seems to be coming out of the Structs.tt file. I'm using the Northwind db and only using the Products table (I excluded all other tables). I return Json(Product.All()). Here's the error: A circular reference was detected while serializing an object of type 'SubSonic.Schema.DatabaseColumn'.Here's the Stack Trace: ...

SubSonic 3.0.0.2 - SimpleRepository Related Tables

I've been looking all over StackOverflow and SubSonic Project and can't find how to perform one query using a SimpleRepository where I have a Product class with a Category. Product contains a CategoryID and Category property to make up the POCO. Category class of course contains CategoryID and CategoryName for the POCO. When I try to ...

Subsonic 3 - how do you execute a stored procedure that returns a value?

How do you execute a stored procedure in subsonic 3.0 that returns a value? For example many of my stored procedures return @@identity, and I can't figure out how to access that value without re querying the table. Again, not an output parameter, but a return value. ...

SubSonic 3.0.0.3 Calling Stored Procedure Issue

Hi, I have updated the subsonic reference from 3.0.0.0 to 3.0.0.3, when I try to execute a stored procedure then I get a following error Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query. I am calling the store procedure as follows db.GetAllLoanApplications(orderBy, ...

Subsonic 3 Simple Query inner join sql syntax

I want to perform a simple join on two tables (BusinessUnit and UserBusinessUnit), so I can get a list of all BusinessUnits allocated to a given user. The first attempt works, but there's no override of Select which allows me to restrict the columns returned (I get all columns from both tables): var db = new KensDB(); SqlQuery query = ...

SubSonic 3 Compatiblity Problem with Not Autogenerated Collections?

Had a system with v2 running well. Swapped out the Visual Studio reference for the v2 DLL to the v3 DLL. Rebuilt the project. Errors. I used to have things called "MyYahooCollection", now I only have "MyYahoo" and "MyYahooTable". The collections seem to be gone. What did I miss? I am using SQL Server 2005 on the back-end and am imple...

Opening examples

Trying to open SubSonic 3.0 examples solution on VS 2k8 Web Express but says cannot be opened. Why? Can you help me? Thanks! ...

Subsonic 3 - Repository GetPagedList Where clause Cast issue

In the Repository there is a GetPagedList method. I have a method that expects a return of PagedList I currently have return _repository.GetPaged(sortBy, pageNumber, 20); However I now need to do some checking such as _repository.GetPaged(sortBy, pageNumber, 20).Where(x => x.IsAdmin == false) This now changes type to IEnumera...

How to open examples - SS3?

Trying to open th solution on VS2k8 PRO and says: The project file - ...path\ActiveRecord.csproj cannot be opened The project type is not supported by this installation The project file - ...path\SimpleRepo.csproj cannot be opened The project type is not supported by this installation Can you help me? ...

Many to Many relationship Subsonic 3 (SimpleRepository)

Hello all, Is this at all possible ? If it is possible could someone ilustrate a very simple example? I can't create a many to many relationship. Thank you ...

SubSonic 3.0.0.3 | SimpleRepository | saving byte[] to varbinary

I got a Model, with a property of type byte[], with corresponding field equivalent on sql server of type varbinary(128). saving went well. but the problem is my password field is always NULL. guser.Password = Encoding.ASCII.GetBytes("sample"); repo.Add(guser); Is this a bug or a user bug? ...

Does anyone use SubSonic in .Net

in SubSonic 3, if i use SimpleRepository, can i ask it to generate forkey as well include "one to many", "one to one" and "many to many" is there any sample code i can have a look at???? what i see from its demo, is only for one table, not dealing with relationship ..if it cannot deal with relationship...i won`t go into it and use it...

SubSonic 3.0.0.3 t4 template generation on lage database runs out of connections

When running the templates against a database with 1400+ tables I get the following error. The server shows hundreds of connections. Does anyone know if this is a problem with template generation in general, or with these templates specifically. Other, smaller DBs generate ok for me. Running transformation: System.InvalidOperationExce...

SubSonic 3.0.0.3 C# How should we handle reserved words?

I have a legacy database that has column names like "void". I also have several Microsoft SSIS log databases. those have column names like "event" and "operator". It looks like we need to set the CleanName on the column early on in Settings.ttinclude template, but I am not quite sure the best way to tackle this since the list of reserv...