Hi,
Can anyone help? When I try to generate my Structs.cs file, the process is failing with the error, becuase the SchemaName is not being returned by MySQL provider.
"
Error 3 Running transformation: System.ArgumentNullException: Value cannot be null.
Parameter name: objectToConvert
at Microsoft.VisualStudio.TextTemplating.ToStr...
I downloaded today Subsonic 3 and tried out the examples. I am having a problem with the SimpleRepository example and I wondered if anyone else has had this. In the HomeController there is a defintion as follows:
public HomeController() {
_repo = new SimpleRepository("Blog");
}
I wanted to enable the migrations an...
I have a problem with the Create View in the SimpleRepository example in Subsonic 3. I get an error at line (28):
<%=Html.DropDownList("CategoryID",new SelectList(Blog.Category.All(),
"categoryid", "description")) %>
Basically, .All() is not known. Does anyone have a solution to this?
Not that should make a difference for this error ...
please show me a demo.
Thanks.
...
Using the new built in testing for Active Record (set "Test" as the connection string) I've hit a problem performing an update.
The code I'm testing pulls an existing object out of the database, makes some changes to it, and then saves it.
public void SaveProduct(string productId) {
var dbProduct = Model.Generated.Product.SingleOrDefa...
I'm trying to use Subsonic 3.0 but with every query I try it gives me this error:
"Invalid cast from 'System.Byte' to 'System.Byte[]'."
I've tried using linq and activerecord on several different tables and always having this problem.
Just to make sure, here is a code snipped that throws the error:
LiteralContent.Text = DB.Teksten.Sin...
I am sure this is a stupid question, but how would I get a pagedlist of filtered items?
Here is how I ended up doing it:
PagedList<Company> company = Company.GetPaged(1, 10);
var list = Company.Find(x => x.CompanyName.ToLower().Contains(query.ToLower()));
company .Clear();
foreach ...
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()
...
I am trying to use Subsoinc 3.0.0.1 to connect to mysql db.
I added dll reference and connection string to app.config
Then I copied templates from ActiveRecord folder to folder in my solution and edited namespace and connection string but then i get this error:
Error 10 Running transformation: System.Data.SqlClient.SqlException: A...
This method works fine:
Person p = new Person(3);
p.Name = "Bob";
p.Update();
However if I have an IQueryable foreign key collection the below fails
var foreignItems = Person.Find(x => x.ID == 3)
foreach(Person p in foreignItems)
{
p.Name = "Bob";
p.Update(); /*THROWS EXCEPTION */
}
Exception is thrown in Repository Update as i...
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. Maybe someone has an answer/solution for this that I can start using.
...
Having a project with following requirements in mind.
data reading intensive application.
100 max concurrent users a times. Application have very high
Though data is huge it is getting modified only once a day
Decided to use subsonic cause of ease of development and potential to work in high traffic environment.
Though few things ...
I have setup a new ASP.NET MVC project and followed the SimpleRepository tutorial by:
Adding the reference to SubSonic.Core (v3)
Created a simple POCO - PhoneType
Created the controller and injected the SimpleRepository
Created the "Create" view
When I ran the sample, I get the following error:
The model item passed into the dict...
In WPF and SubSonic 2 using Active Record, I was able to bind to properties in rows from one table and easily follow the foreign key references (properties that returned the foreign key row representation) to bind to fields in the foreign key table. With SubSonic 3 and ActiveRecord, I'm not quite sure how to do this (easily) anymore. I...
I am having trouble with Subsonic 3.0 generating an object for a table which contains the new HeirachyID datatype. From what I have found, there is no corrosponding .Net type, and subsonic doesn't seem to know how to handle the hierachyid data.
Error that is thrown:
Object of type 'Microsoft.SqlServer.Types.SqlHierarchyId' cannot be...
Hello,
I'm playing around with SubSonic 3.0 at the moment, and it looks really straight-forward (except that I still have to decide between SimpleRepository and ActiveRecord, but that's another story).
However, as the documentation is a bit sparse, I am not sure if it supports foreign-relationships and lazy-loading. Essentially, I have...
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; set;}
}
...
SimpleRepository _repo = new SimpleRepository("ConnectionString");
_repo.Add<Profile>(profile);
...
Hello,
i've been wondering for few hours now how can i get the QuerySurface integrated in my project.
I am using the SubSonic 3.0 ActiveRecord T4 templates with great success,
As i have been doing query with LINQ, i need also the Update, Insert and Delete functionality which according to the documentation utilize QuerySurface.
http:...
I am getting a NullReferenceException when SubSonic calls the default contructor for my database.
In my case the line it errors on is.
DataProvider = ProviderFactory.GetProvider("MDMA");
I have the namespaces set correctly and the classes seam to be getting generated correctly, so it looks like I can connect to the database. Is this ...
I am testing subsonic 3, i can query my database but when i am inserting a record i have an exception. Here is my code:
Client lClient = new Client();
lClient.Name = "Peter";
lClient.FullName = "Richards";
lCliente.Save();
And i have a null reference exception on this generated code:
var newKey=_repo.Add(this,provider);
Any help is a...