Click here to Skip to main content
15,868,016 members
Articles / Hosted Services / Azure

WCF by Example - Chapter XVI - EF 5 & SQL CE - AzureWebSites Deployment

Rate me:
Please Sign up or sign in to vote.
4.33/5 (6 votes)
31 Jan 2013CPOL11 min read 45.1K   1.6K   21  
EF Code First implementation of generic repository and unit of work. With deployment to Azure web sites using SQL Compact.
<?xml version="1.0" encoding="utf-8" ?>
<!--
  NHibernate Configuration
  ========================
-->
  <objects xmlns="http://www.springframework.net">

    <!-- SERVER CONTAINER -->
    <object
        id="ServerContainerRef"
        type="eDirectory.Domain.AppServices.Container, eDirectory.Domain"
        singleton="true">

      <property name="RequestContext" ref="RequestContextRef" />
    </object>

    <!-- Request Context -->
    <object
            id="RequestContextRef"
            type="eDirectory.Domain.AppServices.WcfRequestContext.RequestContext, eDirectory.Domain" />
    
    <!-- Global Context -->
    <object
            id="GlobalContextRef"
            type="eDirectory.Domain.AppServices.GlobalContext, eDirectory.Domain"
            factory-method="Instance"
            singleton="true">

      <property name="TransFactory" ref="TransFactoryRef" />
    </object>

    <!-- Transaction Factory -->
    <object
            id="TransFactoryRef"
            type="eDirectory.EF.TransManager.TransManagerFactoryEF, eDirectory.EF">
      
      <constructor-arg name="modelCreator">
        <object type="eDirectory.Domain.Mappings.ModelCreator, eDirectory.Domain" />
      </constructor-arg>
    </object>

    <!-- AutoMapper -->
    <object
            id="AutoMapperConfiguratorRef"
            type="eDirectory.Domain.Entities.AutoMapperConfigurator, eDirectory.Domain"
            init-method="Install" />

  </objects>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Ireland Ireland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions