SnapDAL for .Net is a combination of a data access helper and a Factory that supports the use of the generic ADO.net interfaces. It is also integrated with the unit testing framework, .NET MockObjects, which supply mock implementations for ADO.net.
Be the first to post a text review of SnapDAL for .Net. Rate and review a project by clicking thumbs up or thumbs down in the right column.
SnapDAL is a combination of a factory based data abstraction layer and a data access helper for the .net platform. It has been designed for ease of use and Test Driven Design (TDD). SnapDAL is nearing final release. The main api has been stable for more than two years. This release fullfills many goals including statement generation, a well worked mock implementation, simplified statement management, a pluggable error handler, and testing aids such as database reset and a statement manager reset. See the change log for many more details, and join the mailing list as examples of how to use these new features will be discussed there. Consider this stable code that will get some minor enhancements as it goes through a couple of release candidates and then the final 1.0 release. A TODO is included in the release. http://snapdal.sourceforge.net
- updated documentation (new NDoc version) - added a method to allow adding an array of statements to statement manager. Can be used to eliminate need to write config files at all if the statements match exisiting metatdata. For example, generate statements from stored procs - added a Reset method to StatementManager so (finally) we can reload the statement cache if a file has changed - added code to support a sql server database reset in the setup of test. See SqlTestHelper.ResetDatabase and SqlTestHelper.ExtractFilesForTest - added code to load preconfigured statements from the provider with a simple interface, IStatementSource - updated DotNetMock to version .75 - remove all but DotNetMock.dll and DotNetMock.Framework.dll from your lib directory - updated NUnit to version 2.2. This may be a breaking change for some if you can't recompile your tests, otherwise, just rebuild and you're good to go. - added sample application that generates statement files from stored procedures or tables and shows one approach to writing a testable UI in asp.net - added Exceptions and Handlers to namespaces for new execption classes and default handlers - begin updates to switch from the specific HybridDictionary parameter type to IDictionary just to allow more flexibitity there. - fixed a bug where swapping a mock command for a sqlcommand in the statement cache and then calling GetDataTable, resulted in an error because the GetRecordSchema method of the MockCommand doesn't support the same schema as other ado.net providers. - changed the CreateDataAdapter method so you don't have send all of the possible IDbCommands when your use doesn't require it. Pass string.Empty for the command name, and that particular command will be ignored. - added IsNullKnown attribute to Statement for codegen purposes - added a TemplateFilter property to Statement. It will be used as a regex to strip matching characters from template parameters. By default it's empty, so for now the default behaviour is to apply the template unchecked - added "Template" parameter types. These are used like normal parameters (put in statement file with type="Template" but work like string.Format to replace {x} macros with the supplied parameter value. Parameters are applied in the order they appear in the statement - added parameter types to custom config parser. See updated OdbcProvider in DataFactory.config - removed remaining code that threw it's own exceptions to support the handler more consistently. All exceptions from SnapDAL will be inherited from DataFactoryException (except in the code gen parts of SqlProvider) - added a HandleExceptionCommand to offer an alternative to throwing exceptions when good code goes bad. You can implement your own handler, and allow the exception to continue to throw or not. - added additional exception types for common database issues allowing you to catch these more explicitly in order to do the right thing if possible. - ConnectionTimout, ConnectionString format issues, ExecutionTimeout, Deadlock, Constraint and LoginFailure exceptions. These are initially coded for the messages Sql Server throws in the mock and sqlclient providers. After some experience, the facility will be extended to all providers. - replaced the implementations of GetDataSet and GetDataTable to build from readers directly instead of using a DataAdapter. This is because different combinations of connections and statements aren't always allowed. The worst example is the the Select, Insert etc. statements often must be of a specific type instead of the generic types thus making the use of deocorators or Mock Objects impossible. - minor fix to stop extra logging for the automatically added Sql Server stored proc calls like sp_who
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?