This project is read-only.
MDS Utilities 2012 Update
For SQL Server 2012 I've updated the web service references in the code.
I removed the mds_staging stuff, as the new Entity Based Staging feature handles that now.

And I added a Custom Workflow Host and a sample IWorkflowTypeExtender to show you how to handle external workflow actions. The Custom Workflow Host is intended primarily to help you build and debug your own custom workflow extensions (ie types implementing IWorkflowTypeExtender). The MDS Workflow Host that ships with the project is fine, but it's hard to test and debug your custom workflow using it. With the Custom Workflow Host you can just hit F5 in Visual Studio and test and debug your custom workflow extensions.

Additionally there are some minor API changes in the CustomAppUtilities project. The ServiceClient in there is enhanced with several convenience methods to make working to the MDS web services easier. So instead of creating a Service Reference directly to MDS, you can just use the one in the CustomAppUtiltities project. The external workflow sample has code to connect back to MDS using the enhanced ServiceClient and read and write entity member data.

Project Description
A set of useful add-ons for SQL Server Master Data Services, including utilities for generating an MDS model, loading the model, writing a custom UI for model data and integrating the model with SharePoint BCS.

This project is a collection of utilities I created over the course of working with customers to implement SQL Server Master Data Services. They are intended to speed up MDS implementations and help out with some common requests we've gotten from customers. I am not part of the Master Data Services product team and this code is provided as-is for your evaluation.

These utilities help with the following scenarios:

1) Importing an existing relational model into Master Data Services

2) Writing custom business rule actions and invoking external workflows.

3) Viewing and Editing model data from custom .NET code or from SharePoint using the Business Connectivity Services.

4) Viewing and Editing model data from a custom ASP.NET UI with full data binding support. This enables you to build custom UI's for MDS with little or no coding.

5) Understanding the MDS Web Services interface by providing sample code for how to interact with various parts of the API.

There are four utilities included:

MDSDataSource Control
CRUD Web Service Generator
Custom Workflow Host and Sample IWorkflowTypeExtender

Here are some more details about the utilities:

MDSDataSourceControl for data binding ASP.NET UI to MDS Model Data, supporting sorting, paging CRUD eg:
      <asp:GridView ID="gvMembers" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateDeleteButton="True" 
        AutoGenerateEditButton="True" AutoGenerateSelectButton="True" CellPadding="4" 
        DataKeyNames="Code" DataSourceID="MDS" EnablePersistedSelection="True" />
          SearchTerm="DepartmentCode<> 'UNK' AND AssetCategory  ='CAPITAL'"
          AttributeList="Code, Name"          

CRUD SOAP Web Service Generator
Code and a web page for generating WCF SOAP service wrappers on top of the MDS Web Service. The CRUD web services are suitable for integrating with SharePoint BCS.
So for an entity like Equipment, it generates a web service with operations like:

  void Equipment_Add(Equipment entity);
  void Equipment_Update(Equipment entity);
  void Equipment_UpdateAttribute(string code, string attributeName, string attributeValue);
  string Equipment_GetAttribute(string code, string attributeName);
  void Equipment_Delete(string code);
  Equipment Equipment_GetByCode(String code);
  System.Collections.Generic.List<Equipment> Equipment_GetByAttributeValue(String attributeName, String attributeValue);
  System.Collections.Generic.List<Equipment> Equipment_GetAll(int skip, int top, string orderBy);

The CRUD Web Service generator (DataServiceGenerator.cs) is in the MDSCustomAppUtilities.dll, and there's a sample admin portal page in the MDS Data Sample web site that you can use as an admin UI to generate the web services.
A command-line utility to import model metadata from a SQL Server database. For customers who do their data modeling in ERWin or somesuch to get jump-started on their MDS modeling.

Usage: MDSModelImport
    [-?]                   Print this help guide.
    -Server:STRING         Source SQL Server
    -Database:STRING       Source Database Name
    -Model:STRING          Name of the MDS Model to create.  It must not exist.
    [-Schema:STRING]       Schema to use for import.  Default is all schemas.
    [-MDSEndpoint:STRING]  URL to MDS Web Service.  Default is in MDSModelImport.exe.config
MDSModelImport.exe -server (local) -database AdventureWorks -schema HumanResources -model HumanResourcesModel -MDSEndpoint http://localhost/mds/Service/Service.svc

This is the second release of sample code, so if you want to use this, be prepared to provide feedback, especially if you run into trouble. Use the Discussions and Issue Tracker to log any problems.

I'll be posting a series of walkthroughs about these utilities on my BLOG:


Last edited Jun 29, 2012 at 7:51 PM by dbrowne, version 14