Embedded Resources

Feb 12, 2008 at 4:51 PM
Hi,

I've made some minor changes to the source code of the Repository factopry so that it meets our naming conventions etc. However I now get the following error whenever there is DB error. What do I need to do. Any help will be GREATLY appreciated.

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "GenericResources.resources" was correctly embedded or linked into assembly "Microsoft.Practices.Repository" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Thanks

Mat
Feb 14, 2008 at 10:48 AM
Okay folks, in case anyone is interested, this is what I did to fix the problem:

1. Did a search for "GenericResources" in the RepositoryFactory projecty and appended "Microsoft.Practices.Repository.Properties." in "RepositoryFailureException" and "RepositoryValidationException"

2. Did a search for "GenericResources" in the DataAccess Guidance Package project for and appended "Microsoft.Practices.Repository.Properties." to it in the the t4 templates (EntityDeleteFactory,EntityInsertFactory, EntitySelectionFactory, EntityUpdateFactory).

This seems to have fixed the problem.

Mat




MatGuthrie wrote:
Hi,

I've made some minor changes to the source code of the Repository factopry so that it meets our naming conventions etc. However I now get the following error whenever there is DB error. What do I need to do. Any help will be GREATLY appreciated.

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "GenericResources.resources" was correctly embedded or linked into assembly "Microsoft.Practices.Repository" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Thanks

Mat

Feb 14, 2008 at 11:28 AM
Actually folks that was a bit premature. Fully qualifying the GenericResources didn't work in the templates (EntityDeleteFactory,EntityInsertFactory, EntitySelectionFactory, EntityUpdateFactory).

Instead I created a new Excpetion and replace the exciting exception in the templates with the followingh:

RepositoryInvalidParameterException(dbParameter);
May 21, 2008 at 11:38 AM
There is actually alternative solution. You could replace the following code:

throw new RepositoryFailureException(ex);

with this one:

throw new RepositoryFailureException(ex.Message,ex.InnerException);


in every generated repository class.