Last post Jan 08, 2007 04:24 PM by phuff
Jan 06, 2007 12:42 PM|TaLz|LINK
i installed and ran blinq.
i chose the adventureWorks database in sql 2005.
i ran th following command:
blinq /t:c:\Inetpub\wwwroot\myBlinqDemo /server:.\SQLExpress /database:AdventureWorks /vdir:MyBlinqDemo /sprocs
the site it gerenated works fine.
if I understand correctly the "/sprocs" flag tells the generator to add the existing stored procs to the "AdventureWorks.cs" file.
is there any way to automatically generate the stored procedures and have the web site use them in all the insert, update, delete commands?
or do i have to run a tool such as "CodeSmith" and then manually replace every insert, update, delete commad with the appropriate stored procedure??
thanks in advance,
Jan 08, 2007 04:24 PM|phuff|LINK
TaLz, as you point out, Blinq doesn't automatically generate code that uses sprocs for updates, deletes, and inserts. To change a Blinq website to use your sprocs, open StaticMethods.cs and replace the code in the update, delete, and insert methods with
calls to your sprocs. You should only have to do this once per sproc, since all pages use the same static methods for updates, deletes, and inserts on a given table.
Hope this helps...