MSDN Archive Home
Help and FAQs
CSMetal Code Generation/Linq provider sample tool
All Resource Updates
Change History (all pages)
CSMetal - Code generating/Linq provider sample
CSMetal is a command line tool that reads Commerce Server 2009 metadata and generates a set of strongly-typed classes to use with the Commerce Foundation API and a set of Linq providers to allow access to Commerce Server entities via Linq.
It can dramatically simplify basic access to Commerce Server 2009 functionality by enabling simple Linq-syntax queries against most Commerce Server entities.
Sample unit tests are included that demonstrate the various access methods including a full checkout scenario.
This tool was created by Kerry Havas, Product Architect of the Commerce Server Product Unit.
It is not an official Microsoft release and is not supported by Microsoft Product Support.
Please use the discussion lists here to ask questions and provide feedback.
There are two solutions that are provided as part of this release
- This is a solution that generates the strongly-typed classes and LINQ providers. It consists of the following projects:
- This is the class library that emits the strongly typed classes and LINQ contexts.
- This is a console application that can be executed to automatically generate the classes.
- This is a solution that provides a set of unit tests and connectivity classes to allow rapid testing of generated classes. It consists of the following projects.
- This is a class library that encapsulates connectivity to Commerce Server 2009.
- This is a class library that contains the generated classes and some supporting classes and encapsulates access to the strongly-typed classes and LINQ contexts.
- This is a Test project which contains tests against the strongly-typed classes and LINQ contexts.
There are also a couple of sample applications, including a rewritten version of the "Orders" sample that comes with Commerce Server, which demonstrates the savings in overall code of using the Linq based queries and even a sample ASP.NET MVC 3 (Razor) application.
Please note that this was developed and tested using the CS20009 VPC available from connect.
It is intended to be unzipped into the following directory: C:\Users\Administrator\Documents\Visual Studio 2010\Projects\CSMetalDev
You may install it elsewhere or use it in your solution environment, but you will need to make modifications to paths, etc.
Please see the readme for directions on changes that would need to be made.
All source code is provided for the code generator and it may be modified to fit your need.
Oct 21 2010 at 7:30 PM
, version 18
Sign in to add a comment
CSMetal - Release 2
Tue Feb 1 2011 at 8:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.