Trying to keep up my end of the bargain with respect to MVC and SubSonic :). I did a walkthrough of it and decided that I was talking too much and, in honor of everyone telling me "SubSonic is dead" I thought it fitting to toss in some Rob Zombie.
Download the template from here.
(Double click to watch full-screen)
so hold tight to those...
Also, lots of brazilian artists in your database :)
I have edited your classes.tt/settings.tt files so they output to seperate files for each table. I have added in a couple of DataAnnotations on the model classes. I have also added a bit at the bottom of classes.tt file which produces a new partial class file to handle any business rule checking the user may want to do outside the actual model class file. This file will not get overwritten if it already exists when the custom tool is run. If you want the files, feel free to contact me.
Keep up the good work!
Thanks
P.S. How do you juggle your busy life. I've just had a baby and finding it very difficult but it must be twice as hard for you!
http://code.google.com/p/subsonicthree/issues/list
Not sure if this is a bug or not but I have changed the database to the one provided by the NerdDinner example. My generated model class is Dinner but when I call repositoy.Update it fails as it cannot find the table in the collection. I pass over Dinner as the item being edited
BuildUpdateQuery(item);
ITable tbl = _db.FindTable(typeof(T).Name); /** Fails **/
typeof(T).Name = Dinner
I have gone down a few levels and I think its because the Name in the DataProvider is Dinners. The DataProvider has all the tables etc in its collection but DataProvider.Tables[2].Name is Dinners so thats why the FindTable fails.
Is this something I have done or a Subsonic3 bug?
Thanks
public ActionResult Create([Bind(Exclude="ArtistId")]Artist item) {
...
}
That will make the ModelState.IsValid true. There might be some other way too, but this seems like the right way to do it. After all, you do want to ignore the auto generated id property when creating a new object. Now I'm going to see if I can change this is the template, since I'm not patient enough to wait for a fixed version.
I also wish that I had your patience in dealing with self-entitled people like me who see a free product and bitch and moan and yell "WHY HAVEN'T YOU FINISHED ALREADY!"! :-P
decided it doesn't matter (edge case SQL) and am now getting the docs
together.
The same thing happens if I create a table of my own in the db and generate the classes again. So I'm wondering if this is a bug in the template, or just my computer that doesn't work (which wouldn't surprise me one bit).
I've been in love with SubSonic since its release, however, I had to stop using it when the latest upcoming release went to live in limbo.
Now you show us this and make us giggle like junior high school girls who are waiting for the next Jonas Brothers movie while we sit and wait for the next SubSonic and groan about the gigantic configuration forests that our current frameworks make us use.
:'(
Does this work with MySql?
Thanks for th quick response.
Thanks for all the great work, I have what I think might be a brain cramp. Just tried the MVC template and when trying to add a controller I get the following errors:
CS0117:Compiling transformation:
Microsoft.VisualStudio.Web.MVC.MvcTextTemplateHost does not contain a definition for ControllerName
It looks like variables are not getting filled in, or I have not configured something.
Any idea what the heck I am cramping up on.
Thanks
Is there a link to explain how all this seems to magically work, I assume its the tt files!
Thanks
What version of Subsonic does this video use?
connection string. Right-click on Classes and Context, and "Run Custom
Tool". I should have added this.
how can i make new model with t4 if i will insert new table to database?
Minor question - is it possible to hide the "Private Implementation Details" classes in the strongly typed view dropdown?
show off the jQuery calendar and dropdowns on the editor...
Excellent demo
[OFF] This database (Chinook) has some really goods artists picks. Specially the brazilians :P [/OFF]
Congrats!
Also nice touch on Dragula
I think you've finally convinced me to drop L2S and try out SubSonic. Nice touch with the OpenID integration. Impressive.
Keep it up.
Conery's done it again, MVC won't die...
looking nice, thanks for pushing the envelope and letting us enjoy the ride...
Would it be possible for you to reply to this message with a download link for your new implementation re the seperate files??
this would be really useful.
thanks
jimi
If you click Google (taking you to Google login page), then click Back and then click Yahoo it will take you to the Google login page rather than the Yahoo login page.