Repository Factory for VS 2008

Jul 1, 2008 at 9:48 AM
When??????????????????????
Jul 2, 2008 at 5:45 AM


Slawomir wrote:
When??????????????????????

When the community decides it wants to build one.

See This thread a few posts down from here.

Coordinator
Jul 6, 2008 at 8:06 AM
Edited Jul 6, 2008 at 8:08 AM
The latest change set supports installing the Repository Factory on Visual Studio 2008. However, there are still some work in progress and more testing and bug fixing need to be done. You can download the installer from here.

Luis

Slawomir wrote:
When??????????????????????


Jul 7, 2008 at 4:42 PM

lerocha, thank you for getting this ball rolling!  I work in a very large and diverse shop with a number of different database technologies.  For VS 2008 projects backed by SQL Server we are recommending LINQ To SQL.  However, until LINQ To SQL supports at least Oracle, the Repository Factory will continue to play an important role for us.  Our alternative is to force all Oracle backed products to either hand roll their own DAL solution or stay in VS 2005, both of these options significantly affect supportability.  Do you have an eta on which we can expect a stable solution?  Are you looking for community support on this one?

Kevin (orlandocoder)

Coordinator
Jul 10, 2008 at 3:00 AM
Edited Jul 10, 2008 at 3:03 AM
Kevin,

I don't have an eta for getting a stable version. I have been away for a while and recently came back. I noticed some issues when running the Repository Factory with SQL Server and made a few fixes last month. I haven't tried running with Oracle yet. I wasn't the original developer of the Oracle support, so I still have to catch up with it.

If more people want to help, it will be great. There are many ways for helping like joining the project (see this post), testing and reporting bugs in the issue tracker, uploading a patch (just found out this, see this link), or simply posting a code fix in this discussion list.

Luis
Dec 8, 2008 at 10:41 AM
Hi All,
Its gr8 to know that you all make Repository Factory Alive for VS2008. 
We have a WCF Service project in VS2008 and .net3.5 with DB2 as database. I tried using Build 18936 Release. for DAAB but facing fallowing issues;
1) there is no DB2 provider for connection.
2) I am facing on error message while generating Business Entity:
"
Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateBEFromDBVB. Error was: Action GenerateBusinessEntities failed to execute:
Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown..
You can remove the reference to this recipe through the Guidance Package Manager. ---> Compiling transformation: The type or namespace name 'IDbTypesHelperStrategy' could not be found (are you missing a using directive or an assembly reference?)
----------------------------------------------------------------------------------------------------

   --- End of inner exception stack trace ---
   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
   at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
   at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
   at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
   at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()"
 
3) Since we are using VB.Net, I found there are no classes for generate repository code in vb.net

Kindly help in adding DB2 data provider and resolving the above error


Regards
Anmol
Coordinator
Dec 14, 2008 at 11:46 PM
Hi Anmol,

The VB.NET support is not available yet. We are in the process of updating the VB.NET T4 templates to match all changes made into the C# ones during the Oracle support implementation (see work item # 12012). We will create a new release when this task is completed, and then you can download and install it.

Cheers,
Luis
Jan 8, 2009 at 6:47 AM
Hi lerocha,
First of all Warm Greetings on start of this new year 2009 and thanks for listening up my query. I checked your reply late as didn't received replied mail
by the time I have customized Build 18936 Release. to support DB2  v9.5 for windows.  I have added the class structures for DB2 as already there for SQL Server and Oracle and its working fine for our requirements.
But I was shattered to know it wont support VB.NET, we only need it to work with that.
Build 18936 already have files & folders created for VB.Net. Are these Templates wont work right now? Is there a major conversion required for VB.NET?
If not, Can you please help me with the basic changes as to generate classes for VB.NET or give a rough estimate of its completion. In our requirement We need Repository factory  with DB2 and VB.NET

Can you please help me on that


Regards
Anmol
anmolarya01@gmail.com
Coordinator
Jan 9, 2009 at 6:16 AM
Edited Jan 9, 2009 at 6:17 AM
Hi Anmol,

The VB.NET T4 templates in the Build 18936 are out of date. Although it contains VB.NET templates, the guidance recipes to execute them are not working. The only recipe that works is the one to generate the business entities classes, the other ones are not showing (Work Item #11415). Since Build 18936, we had many changes (Oracle support) and only the C# templates have been updated. I will basically recreate the VB.NET templates based on the current C# templates. I will take a look at VB.NET templates this coming weekend and let you know.

Are you willing to share your changes for DB2 with us? You can submit your code using the Upload Patch page.

Cheers,
Luis

Jan 12, 2009 at 3:38 PM

Hi Luis,

Thank you for your support and hopes of VB.NET templates. 
You said it works to generate entities but in my case it has given an error, I mentioned above.I think VB.NET is a great requirement for whole community.As VB.NET is equally favourable as C#.
 I am excited to contribute to community but currently I customize it to support our own requirement and is not tested well, I'll work to standerdize it more and will soon add to the comunity,I feel it will be best paid off if others will get any benifit from it.
Further, I like to ask you if you have any document of repository factory archtitecture and excution flow which you can share to make the factory style of code understandable because currently Its difficult to understand it. 

Regards
Anmol
anmolarya01@gmail.com
 
Coordinator
Jan 14, 2009 at 5:01 AM
Hi Anmol,

The error you get above only happens because you are using the change set #18936. This error has been fixed a while ago, since we started testing the T4 templates with NUnit (change set # 20456). I can create the business entities in VB because I am using a recent version.

When we inherited this code, the original authors did not have any documentation about it. We ended up learning from the code (still learning, actually ;-)
The Repository Factory is a software factory created using the Guidance Automation Toolkit (GAT). So, you can find information about creating a GAT software factory in general, which can help you understanding the Repository Factory code/architecture:
As to the VB.NET support, I started working on it based on the current C# templates. It is taking more time than expected, and still depends on the C# side to be completed.

Cheers,
Luis
Feb 2, 2009 at 6:49 PM
Edited Feb 2, 2009 at 6:52 PM
Rather than start a new thread, I am having the same issue as above, only I am using C#

I don't know the change set, but I only downloaded 2 days ago from here. I have used the repository factory in VS2005 many times and consider it to be an essential part of my toolkit, but am frustrated by the new version. I am also trying to implement the Entities recipe from inside a Service factories solution and get the same error as previously posted. The only difference is that my SQLExpress edition is 2008, but since I can see the tables, I don't think this is the issue.

Can you let me know the current situation? I am trying to recommend these factories as part of a large project that I am architecting but these breaks will rule it out. Any direction? 

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateBEFromDBCS. Error was: Action AddEntities failed to execute:
Index was outside the bounds of the array..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Microsoft.Practices.RepositoryFactory.Actions.VisualStudio.SplitAndAddItemsFromStringAction.FindOrCreateProjectFolder(ProjectItems items, String[] fragments, Int32 index)
   at Microsoft.Practices.RepositoryFactory.Actions.VisualStudio.SplitAndAddItemsFromStringAction.GetTargetProjectItems(Project project, String relativeTargetPath, String fileName)
   at Microsoft.Practices.RepositoryFactory.Actions.VisualStudio.SplitAndAddItemsFromStringAction.Execute()
   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary`2 inputValues)
   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)
   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionCoordinationService.Run(Dictionary`2 declaredActions, XmlElement coordinationData)
   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
   --- End of inner exception stack trace ---
   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
   at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
   at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
   at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
   at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()