I have just started to setup a test project using Ibatis for .Net. This is my first time using Ibatis, not to mention the data mapper pattern. I have my app structured into a persistence layer, service layer, domain layer, a UI layer, and also a test project. Right now, I am using service classes to interact with the Ibatis mapper API. So, I may have an EmployeeService class which would wrap calls for CRUD operations, and also coordinate any other application wide operations an employee object would be involved with. One thing about doing this is that the service classes will become verbose. My service classes take an instance of ISqlMapper, and I am currently using what some call "poor man's dependency injection" to inject a default implementation. This also allows me to mock this instance using a mocking framework during testing.
Another thought was to put wrapper classes in the persistence layer that wrap all crud operations. That, or perhaps use something like the repository pattern. The problem with both of these approaches is they seem like a lot of work for little value added. I guess I'm looking for some advice on whether the service layer approach will work well and scale, or if another layer of abstraction will provide enough value to warrant the effort. By the way, I am thrilled with how fast I was able to get up and running with Ibatis, and really pleased with the results. Where I work, legacy databases, complex queries (reporting), and sprocs rule the day, so Ibatis fits much better than something like nhibernate. Thanks. -S _________________________________________________________________ In a rush? Get real-time answers with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008

