yes, i've seen this sample, but I think it is far away from Todds ideas.
I do not want to use a differnt object model for data-access and business-layer.
The way the datamodel is used in todds blog (vertical across all layers) seems to be very nice and simple to me.
I have difficulties to decide what sort of code to place inside the data layer.
Todd says all the Linq-stuff could be placed there, but I could learn much better from a sample.
I tried to put things together for my own now.
A simple solution containing four pojects: DomainModel, DataLayer, LogReader (=BusinessLayer) and TestApp (=Frontend).
- DomainModel: containing a class RawLogEntry marked as Persistent
Project is enabled for persistent classes and marked for enhancing (whatever this means...)
Mapping is done forward to a SQL-Server 2005 express, it worked like a charm
- DataLayer: containing the objectScopeProvider from the wizzard and a class RawLogEntryRepository to access the DB
Project is enabled for DAL
- LogReader: containing code to get and parse logstrings and to put them as RawLogEntries to the DB using the RawLogEntryRepository from the DataLayer
- TestApp: simple starter console app
Unfortunately I cannot get this simple thing to work.
If I start it, I get a message saying The 'openaccess' section cannot be found in the application's configuration file.
If I enable the TestApp project (what I do not want anyway...) there comes another message up at db.GetObjectScope()
Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction.
This may be caused by a missing app.config file (use app.config as embedded resource then)
or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too)
or by a wrong enhancement setting; please check your configuration.
Sure, the DomainModel Project is marked for enhancing.
You can download the solution at http://root.startp.de/trans/LogAnalyzer.zip
Can you explain where (in which project) to put the config for database access?