<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for MortMan79</title><link>http://disqus.com/by/MortMan79/</link><description></description><atom:link href="http://disqus.com/MortMan79/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 12 Dec 2008 13:36:16 -0000</lastBuildDate><item><title>Re: SubSonic 3 Alpha Updated : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-alpha-updated/#comment-4370160</link><description>&lt;p&gt;A small bug:&lt;br&gt;The GetPK method in the &lt;a href="http://_Utility.tt" rel="nofollow noopener" target="_blank" title="_Utility.tt"&gt;_Utility.tt&lt;/a&gt; file expects primary keys to have their name prefixed with "PK_". Oracle likes to postfix "_PK" so if you get PK violations on inserts then maybe you need to change the template or the names of you PKs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Fri, 12 Dec 2008 13:36:16 -0000</pubDate></item><item><title>Re: SubSonic 3 Alpha Updated : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-alpha-updated/#comment-4370086</link><description>&lt;p&gt;That should work just fine, my code is very similar. Just keep in mind that the type you are passing in should be one of the entities created by SubSonic from the database. What problem are you having?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Fri, 12 Dec 2008 13:32:30 -0000</pubDate></item><item><title>Re: SubSonic 3 Alpha Updated : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-alpha-updated/#comment-4364930</link><description>&lt;p&gt;SubSonic needs a connectionstring defined in the configuration file (app.config/web.config). It tries to go there looking up the connectionstring NAME you provided (name not just connectionstring). You get that error if SubSonic cannot find the connectionstring.&lt;/p&gt;&lt;p&gt;I am guessing but I think you need to fill out the provider field on the connectionstring so that SubSonic can decide which data provider to instantiate.&lt;/p&gt;&lt;p&gt;Hope this helps, I haven't tried it myself yet (I have the same problem) :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Fri, 12 Dec 2008 07:30:06 -0000</pubDate></item><item><title>Re: SubSonic 3 Alpha Updated : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-alpha-updated/#comment-4332293</link><description>&lt;p&gt;Great stuff! Going to play around with it now.&lt;/p&gt;&lt;p&gt;Just out of curiousity how do you see SubSonic in relation to Linq2SQL? I see two main improvements in SubSonic:&lt;br&gt;1. Multiple provider support (Oracle, MySQL etc.)&lt;br&gt;2. Easier customization using T4 templates&lt;/p&gt;&lt;p&gt;Anything else? &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Thu, 11 Dec 2008 14:35:30 -0000</pubDate></item><item><title>Re: Crazy Talk: Reducing ORM Friction : Rob Conery</title><link>http://blog.wekeroad.com/blog/crazy-talk-reducing-orm-friction/#comment-4242262</link><description>&lt;p&gt;To try out different ORM/data access approaches I decided to implement your IRepository&amp;lt;t&amp;gt; for a small application. My idea was to implement Db4o then Linq2SQL then SubSonic 3 and see which I liked the best. So far I managed to refactor the existing data access to use IRepository. The existing data access uses Oracle, simple selects/SPs to retrieve and update data from two tables. So far I have implemented my Db4oRepository and I have encountered a fewproblems:&lt;/p&gt;&lt;p&gt;1.	Db4o does not take kindly to multiple web sites sharing a database file. This is per design but is really a show stopper since my application consists of two distinct websites operating on the same data. Also Db4o seems to get confused saving/loading complex hierarchies of references. Loading a list (100 elements) that references a set of elements which each reference each other through a tree took 10 seconds to load.&lt;/p&gt;&lt;p&gt;2.	It could be that I am too used to SQL, but all my objects have one or more IDs that are either their own ID or a reference. These IDs are normally assigned by the database, but Db4o does not assign IDs. So to use both SQL and Db4o I need to either make Db4o assign IDs like SQL and thus know about which field is an ID or I have to hide the IDs. Neither solution is attractive - making Db4o assign IDs seems the safest.&lt;/p&gt;&lt;p&gt;3.	The next problem I encountered was that my Db4o repository only needs to work on one type while my Oracle repository needs to work on two types (remember I have 2 tables). This is because Db4o stores a whole object including references and references references. This is a cool feature, but SQL works differently and really provides a model that is very different.&lt;/p&gt;&lt;p&gt;My conclusion is that your idea is sound, especially for a quick spike which needs some persistence. Db4o might also be useful for the initial stages of a website, but once you decide to switch to SQL then you will need to make several changes and you can’t go back. I would not suggest trying to run a SQLRepository side by side with a Db4oRepository. The models are too different and the result feels wrong.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Sun, 07 Dec 2008 22:53:51 -0000</pubDate></item><item><title>Re: SubSonic 3.0 Preview 2 : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-0-preview-2/#comment-4043674</link><description>&lt;p&gt;In Robs videos he isn't actually running the .tt scripts against MySQL he is only using the same generated code against MySQL. Anyhow I want to get SubSonic working with Oracle so I added a data provider in the &lt;a href="http://_settings.tt" rel="nofollow noopener" target="_blank" title="_settings.tt"&gt;_settings.tt&lt;/a&gt; file:&lt;/p&gt;&lt;p&gt;const string DataProvider = "System.Data.OracleClient";&lt;/p&gt;&lt;p&gt;Then I modified the &lt;a href="http://_Utility.tt" rel="nofollow noopener" target="_blank" title="_Utility.tt"&gt;_Utility.tt&lt;/a&gt; to use the DataFactory class based on the DataProvider as shown below. This works but gives trouble with the schema retrieval. I will have to look at it again. Also the remaining code, mapping datatypes to from C# to SQL and retrieval of foreign keys, is hardcoded to MS SQL so that will need to be tweaked. Here is my modified &lt;a href="http://_Utility.tt" rel="nofollow noopener" target="_blank" title="_Utility.tt"&gt;_Utility.tt&lt;/a&gt; :&lt;/p&gt;&lt;p&gt;&amp;lt;#@ include file="&lt;a href="http://_Settings.tt" rel="nofollow noopener" target="_blank" title="_Settings.tt"&gt;_Settings.tt&lt;/a&gt;" #&amp;gt;&lt;br&gt;&amp;lt;#+&lt;/p&gt;&lt;p&gt;string CleanUp(string tableName){&lt;br&gt;string result=tableName;&lt;/p&gt;&lt;p&gt;//strip blanks&lt;br&gt;result=result.Replace(" ","_");&lt;/p&gt;&lt;p&gt;//put your logic here...&lt;/p&gt;&lt;p&gt;return result;&lt;br&gt;}&lt;/p&gt;&lt;p&gt;DbProviderFactory GetFactory(){&lt;br&gt;return DbProviderFactories.GetFactory(DataProvider);&lt;br&gt;}&lt;/p&gt;&lt;p&gt;DbConnection GetConnection(){&lt;br&gt;string connectionString=ConnectionString;&lt;/p&gt;&lt;p&gt;DbConnection conn= GetFactory().CreateConnection();&lt;br&gt;conn.ConnectionString = connectionString;&lt;br&gt;conn.Open();&lt;br&gt;return conn;&lt;br&gt;}&lt;br&gt;string GetPK(string table){&lt;br&gt;string[] restrictions = new string[4] { ProviderName, null, table, null };&lt;br&gt;DataTable tbl=GetSchema("IndexColumns",restrictions);;&lt;br&gt;string pk="";&lt;br&gt;foreach(DataRow dr in tbl.Rows){&lt;br&gt;string index=dr["constraint_name"].ToString();&lt;br&gt;if(index.StartsWith("PK_")){&lt;br&gt;pk=dr["COLUMN_NAME"].ToString();&lt;br&gt;break;&lt;br&gt;}&lt;br&gt;}&lt;br&gt;return pk;&lt;br&gt;}&lt;br&gt;DataTable GetColumns(string table){&lt;br&gt;string[] restrictions = new string[4] { ProviderName, null, table, null };&lt;br&gt;return GetSchema("COLUMNS",restrictions);&lt;br&gt;}&lt;br&gt;DataTable GetTables(){&lt;br&gt;return GetSchema("tables");&lt;br&gt;}&lt;br&gt;DataTable GetSchema(string meta){&lt;br&gt;return GetSchema(meta, new string[4]);&lt;br&gt;}&lt;br&gt;DataTable GetSchema(string meta, string[] restrictions){&lt;br&gt;DataTable tbl=null;&lt;br&gt;using(DbConnection conn=GetConnection()){&lt;br&gt;tbl= conn.GetSchema(meta, restrictions);&lt;br&gt;}&lt;br&gt;return tbl;&lt;br&gt;}&lt;br&gt;DataTable GetSPs(){&lt;br&gt;return GetSchema("Procedures");&lt;br&gt;}&lt;br&gt;DataTable GetFKs(string tableName){&lt;br&gt;DataTable tbl=new DataTable();&lt;br&gt;using(DbConnection conn = GetConnection()){&lt;br&gt;DbCommand cmd= GetFactory().CreateCommand();&lt;br&gt;cmd.CommandText = FKSql;&lt;br&gt;cmd.Connection = conn;&lt;/p&gt;&lt;p&gt;DbParameter parm = GetFactory().CreateParameter();&lt;br&gt;parm.ParameterName = "@tableName";&lt;br&gt;parm.Value = tableName;&lt;br&gt;cmd.Parameters.Add(parm);&lt;/p&gt;&lt;p&gt;DbDataAdapter da = GetFactory().CreateDataAdapter();&lt;br&gt;da.SelectCommand = cmd;&lt;/p&gt;&lt;p&gt;da.Fill(tbl);&lt;br&gt;}&lt;br&gt;return tbl;&lt;br&gt;}&lt;br&gt;DataTable GetSPParams(string spName){&lt;br&gt;string[] restrictions = new string[4] { ProviderName, null, spName, null };&lt;br&gt;return GetSchema("ProcedureParameters", restrictions);&lt;br&gt;}&lt;/p&gt;&lt;p&gt;------- SNIP the remaining code ----&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Thu, 27 Nov 2008 18:12:05 -0000</pubDate></item><item><title>Re: SubSonic 3.0 Preview 2 : Rob Conery</title><link>http://blog.wekeroad.com/blog/subsonic-3-0-preview-2/#comment-4043645</link><description>&lt;p&gt;- empty -&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MortMan79</dc:creator><pubDate>Thu, 27 Nov 2008 18:07:13 -0000</pubDate></item></channel></rss>