Repository Pattern with WCF?

I am using the Repository Pattern which means i have 1 project which is my DAL that contains a DBML file, then i have another project which contains all the Interfaces and Services.
If i create a WCF Application Library (within the same Solution) is it possible for me to use the existing Interfaces and Services, if i add the relevant attributes (ServiceContract, DataContract) to my classes and then have one project to maintain the WCF
service code and any other apps that use the Service project?
If so any links i could follow?

Hi Pure Deal,
If you create a WCF Service library in the same solution, you can use the existing interfaces and services, also you need to add the relevant attributes (ServiceContract, DataContract) as you said, after that if you want to use the service, you need to host
the wcf service. In WCF there are four common ways(IIS/Windows Services/WAS/Self-hosting) to host WCF Service, all of which are outlined nicely on MSDN:Hosting
WCF Services.
1.
Hosting in IIS.
2. Hosting in WAS.
3.
Hosting in a Windows service.
4.
Hosting in an application ( "self-hosting").
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Good or Bad: Repository pattern with Entity framework??

    Suggestions about not to use enttity framework because:
    1) entity framework is itself a Repository pattern
    2) So, what the use of having one more repository pattern over an exisitng repositroy pattern (i.e Entity framework)
    Please suggest.
    Thanks in advance!!

    I've used both nHibernate and the Entity Framework 6 and nHibernate wins hands down as the best orm, despite it's learning curve. ORMs can be massive timesavers as you don't end up writing boiler plate db access code.
    I used 3 different versions on nHibernate over the years. I didn't paticulalry care for any version of nHibernate. I much prefer EF over nHibernate any day of the week, month or year.
    Unlike the previous responder I disagree with testability, each repository should have it's own interface. And if implemented correctly it can save tones of time as you need only mock one or two repository methods rather than 10s or 100s of database
    gateway call using one class per table.
    What? Like a  DAO can't  have an interface, which is just as testable as any repository pattern using an interface when using a test harnerss and testproject to test the DAO? And one has to go beyond some generic repository pattern in
    unit, functional and intergation testing when it comes to data access. 
    Unlike you, I want complete control of the object all aspects of it even in its usage of other DAO(s) that could or would be used, which the  repository pattern doesn't cut it for me. 
    Like I said, I'll take EF over nHibernate, which is much like talking MS SQL Server over Oracle with Oracle being a PITA to work with it.

  • An Architectural decision with WCF

    Hi,
    We are re architecting our internal ERP system in VS2010. At present we decided to use 100% browser based applications (Intranet). Here is my current setup
    Here are my n-layers
    1. Database (SQL 2008)
    2. ORM (EF 4)
    3. Repository pattern (Generic)
    4. Service Layer (All business logic here)
    5. Presentation layer (MVC)
    Based on above I have 2 option for physical tier setup (n- tier)
    Option A
    1. Database Server (Just a store SQL 2008)
    2. IIS 7 Server (Domain + MVC) which is (MVC > Service Layer > Repository > ORM)
    3. Client Browser
    Option B
    1. Database Server (Just a store SQL 2008)
    2. IIS 7 Server (MVC Just presentation logics)
    3. IIS 7 WCF Server (Model) which is (Web Service > Service Layer > Repository > ORM)
    4. Client (Browser, Blackberry etc)
    In OPTION-A MVC communicate in the same tier (IIS 7) to get database info. Basically no WCF, were as in OPTION-B MVC communicate with WCF Web Service (which is in another tier) to get database info.
    Performance, Extensibility and Security wise which option is more appropriate in the above scenario?
    Thanks
    Achu.

    Hello,
    This should have been asked in the
    ASP.Net MVC forum on forums.asp.net.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Producer/Consumer Design Pattern with Classes

    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Jason

    JTerosky wrote:
    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Including the error cluster as part of the  private data is something I have never seen done and ... well I'll have to think about that one.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Web service security policies interoperability issue with WCF

    Hi,
    I've created a web service in Jdeveloper 11g which I have deployed to a stand alone weblogic server 10.3. I also created a web service proxy in Jdeveloper 11g that works perfectly. The service is using Wssp1.2-2007-Https.xml policy.
    I have the requirement of a C# consumer, but when I run svcutil to generate the client class and config, it throws the following warning:
    A security policy was imported for the endpoint. The security policy contains requirements that cannot be represented in a Windows Communication Foundation configuration. Look for a comment about the SecurityBindingElement parameters that are required in the configuration file that was generated. Create the correct binding element with code. The binding configuration that is in the configuration file is not secure.
    What security policy is compatible with WCF?
    Thanks,
    Miguel.

    I had the same issue and solved it like this:
    Create a signed certificate, import it into your keystore and use that as Signature Key alias in both the client as the server security. Make sure the user with the same name exists in the realm on the server.
    Hope this helps,
    Lonneke

  • Solution manager can be used as repository DB with out-of-box integration?

    Solution manager can be used as repository DB with out-of-box integration?
    Hi ,
    In Our Global SAP Environment, We are looking to use solution manager as a CMDB ( Config management DB) , which is kind of repository DB where it needs to keep track of infrastructure components .    
    A CMDB about Host consists of elements like
    No. of CPUs,
    RAM  size,
    ...etc
    For example in solman SMSY , you get some  information about the SAP Host . 
    we have multiple CMDB systems , each one for our supplier .
    For example Host hardware () CMDB is managed by Vendor1,
    Storage CMDB by  vendor 2  , and we need to join the both information , in order to get the Full elements of the Host .
    A host information spread across the Multiple Vendor CMDBs.
    Now we want to use solman as single CMDB, where Solman keeps track of some data , and needs to get some additional data  from vendor1 by connecting  into
    their DB using  the  username/password ..etc
    Does the solman has this Out-of-box functionality?
    Thanks
    Vasu .

    Hi - smilar question
    If we setup the system monitoring using solution manager , can we able see the TCodes & their screens from solman .
    For example Can I able to control my ECC screens (SCC4, RZ10,SMLG,SALE,SPAD,SM59,.... ) from Solution manager ?
    waiting for the reply .
    Thanks
    Vasu

  • Adding HTTP Auth header with WCF-Basic http adapter

    Hello,
    we have a scenario where we receive a message from a source ssytem and make a
    soap webservice call using this message. The third party webservice expects basic
    authentication. The source message contains the userid/passphrase to be used while
    making the webservice call. How can we go about adding this auth headers with WCF adapters?
    Any suggestions?
    thanks

    Refer http://msdn.microsoft.com/en-us/library/bb226467.aspx and lookup Username and Password for the properties to use when handling WCF with Basic Authentication.
    For creating the send port for the service refer
    http://msdn.microsoft.com/en-us/library/jj572853(v=bts.80).aspx
    So somewhere in your orchestration you'll read the userid/passphrase and then in the Construct Shape use WCF.Username and WCF.Password to assign these value for the outbound call to the 3rd party web service. With the send port setup to use the Basic Authentication
    credentials it'd work.
    Regards.

  • Matching Route Patterns with standard Local Route group and Specific Route Group

    Hi
    I have a customer with CUCM 8.6 with few branches
    couple of branches in UK and few in Europe and middle east.
    I configured route patterns with Standard local route group, but using their own Voice gateway, everything was working fine until adding the recent branch with matching pattern 
    UK has a mobile pattern with 9.07XXXXXXXXX (11 digits)
    One Branch has a mobile with 9.07XXXXXXXX (10 digits)
    When branch call 907X..(10digit) number there was a delay and I ticked the Urgent priority to process it quicker, but later realized the UK branch cannot dial 907x.. (11Digit) mobile.
    I created Route List for branch and added the 10 digit pattern to that but still the UK cannot call 11 digit. so i believe when you call out it will check the pattern first and the Route-List and Route-Group and gateway play a part.
    Is there a way to get 07 -10digit call out quickly also allowing the 07 -11digit pattern as well ( without changing the T302 timer)
    Really appreciate your support
    thanks
    shameer

    Yes, they key to managing overlapping centralized dial plans is to be really good with patterns, partitions, and CSSs. You can have 3 different 9.0[2-9]XX-[2-9]XX-XXXX patterns and assign them a different partition, and then assign that to the branch CSS. This will only work if each Branch has a different CSS.
    For example:
    9.0[2-9]XX-[2-9]XX-XXXX @ Egypt-PT ->Routes to Local route group of Egypt.
    9.0[2-9]XX-[2-9]XX-XXX @ UK-PT -> Routes to Local route group of UK
    9.0[2-9]XX-[2-9]XX-XXX @ Germany-PT -> Routes to Local Route group of Germany.
    //PT = partition//
    Then have Egypt-CSS that contains 9.0[2-9]XX-[2-9]XX-XXXX @ Egypt-PT. 
    UK-CSS contains 9.0[2-9]XX-[2-9]XX-XXX @ UK-PT
    Germany- CSS contains 9.0[2-9]XX-[2-9]XX-XXX @ UK-PT
    The other patterns will be invisible to your sites because they are in a different partition that is not in their CSS. 2 overlapping patterns in the same PT will cause you to wait for the inter-digit timeout unless you press #.
    Thanks,
    Frank

  • Route Pattern with Pause in CUCM 10.5

    Dear Experts,
    I need to create a route pattern with a pause to dial a secondary number.
    the customer is forwarding international calls to tollfree number, then the user is dialling the international number.
    He is requesting to make it as one step, dial the prefix and international number at the same time.
    the pattern is 44.00! 
    44 will be transformed to the toll free number, and the rest is the international number.
    Any idea
    thank in advance
    Regards
    Anas

    Jonathan is correct (+5) - Route pattern and neither the translation pattern would not be able to do that. Tried in my lab CUCM 10.5, it doesn't recognizes comma as a valid entry :
    You can configure pause in the pots dial-peer by comma, but I doubt it will be helpful here.
    -Terry

  • Route pattern with called party transformations

    HI All,
    i wanto to add route pattern with transformation
    i want to add RP with 9.001! predot
    and want to convert to 9.01017! with called party transformations.
    How we replace ! ? i've tried and it's error with message
    Called Party Transform Mask - allowed characters are numeric (0-9),plus (+),asterisk (*),pound (#),X.
    I've give screen shot for the configuration
    Please anybody help.
    Thanks in advance
    Regards,
    ATommy

    You can create the RP with 9001.! and in the called party, discard predot and prefix 901017.
    see below screenshot:

  • Performance Problem with WCF proxy

    I communication with SAP XI and Microsoft BizTalk from a .NET 3.0 WCF proxy. I receive about 5 MB of data. When I use a .NET 2.0 generated proxy (Visual Studio) the calls are quite fast and take nearly the same time. If I use a WCF (.NET 3.0) proxy the communication with BizTalk is very fast, but with XI it takes extremely long.
    What's the reason for that? Does the WCF proxy parse and validate the message? (5 MB are quite much..., with a few KB I don't have this problem) How can I deactivate the validation?
    thanks in advance

    Hi Thomas,
    not sure what you mean with deactivate validation. have you check with WCF Performance Counters where the problem can be? For more information about performance countes see http://blogs.msdn.com/sonuarora/. Let me now what the counters say, mazbe I'm able to help you then with more details.
    - Juergen

  • Factory Patterns with Generics

    I am trying to combine the good old factory pattern with generics and could use some advice.
    I have the following
    //Base class from which all my things extend
    public abstract class Thing {
    //one kind of thing
    public class ThingOne extends Thing {
    //another kind of thing
    public class ThingTwo extends Thing {
    //interface for my factory
    public interface ThingFactory<T> {
    public T create(long id);
    //a factory for thingones
    public class ThingOneFactory<T> implements ThingFactory<T> {
    public T create(long id) {
    return (T) new ThingOne();
    public class TestClass{
    public <T extends Thing> T getThing(ThingFactory<T> tf){
    //do a bunch of generic stuff to figure out id to call create
    ThingFactory<T> instance = tf;
    return (T) instance.create(Long id);
    }My calling code would know what kind of thing it needs but necessarily the things id. Which can be computed in a generic way.
    TestClass gt = new TestClass();
    gt.getThing(new ThingOneFactory<ThingOne>());This all seems to work properly but I am getting "Type safety: Unchecked cast from ThingOne to T" in my ThingOneFactory
    My T's will always extend Thing, what am I missing? Is there a better way to do this?
    Edited by: nedry on Dec 29, 2009 5:39 PM

    I thought of that after I posted. But that just moves my unsafe cast warning into TestClass.Why?
    return (T) instance.create(Long id);That can't have ever compiled. What is the exact code? And why did you have to cast (what was the warning/error)?

  • Repository variable with report level prompts

    Hi Gurus,
    i want to display previous year ,current year into one prompt.
    i have created two repository variables with the name of previous year and current year . i have tried for sql results its giving me odbc error.
    SELECT @{biServer.variables['currentyear']['previousyear']}  "year"."year ID" FROM "table a" these query is giving odbc error. could you please help me out to resolve these issue?

    Why two create two variables,Go head and create one presentation variable and embed the below sql
    SELECT saw_0 FROM ((SELECT Year(CURRENT_DATE) saw_0 FROM "SampleSales") UNION (SELECT Year(CURRENT_DATE)-1 saw_0 FROM "SampleSales")) T1 ORDER BY saw_0
    Where SampleSales is my Subject Area.
    Mark if helps.

  • Subversion - a repository connection with the supplied URL already exists

    Hi all!
    OS: SuSe 9.3
    jdeveloper:jdevstudiobase10131
    I need to create three repository connection to the same URL, with different user but jdeveloper doesn't give me any chance to do it. Returning the following error:
    Could Not Create Connection
    A repository connection with the supplied URL already exists.
    Any idea here?
    Thanks
    Gilberto
    Message was edited by:
    gilbertoca

    You might be dealing with orphaned site. Go through the following blog post and see if it helps you delete the orphaned sites.
    http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=299
    Amit

  • How to develop repository manager with initial folder structure

    Hi 2 all!
    I wonder if it is possible to create new repository programmatically with defined folder structure. I'm interested in solutions when repository manager is works with db or file system. Can you provide any example or tell me where can I define my structure?
    thnx

    Hi Nata!
    Basicly this task consists of two steps:
    1. Deploy a new configuration object for the repository manager
    2. Create the intial folder structure
    Step one is simple. Here is the configuration object of the repository manager for /documents. It's been exported from the KM configuration by using the standard export mechanisms. This can be included into a portal application project in Netweaver Studio.
    documents.co.xml
    <?xml version="1.0"  encoding="UTF-8" ?>
    <!-- file generated by configuration framework Jun 27, 2008 9:16:36 AM -->
    <Configurable configclass="CmRepositoryManager" owner="km.appl.rep.mgr.prjconfig">
    <property name="ro-expiry-time" value="0"></property>
    <property name="fsconttrack" value="true"></property>
    <property name="poolid" value="dbcon_wcmdb_cm"></property>
    <property name="securitymgr.aclcacheid" value="ca_rsrc_acl"></property>
    <property name="localroot"></property>
    <property name="serverfarm" value="false"></property>
    <property name="propertysearchmgr.class" value="com.sapportals.wcm.repository.manager.cm.CmPropertySearchManager"></property>
    <property name="keepVersionHistory" value="false"></property>
    <property name="securitymgr.aclcfg" value="acl_jdbc_rep"></property>
    <property name="versioning.localroot"></property>
    <property name="persistence.mode" value="db"></property>
    <property name="hidden" value="false"></property>
    <property name="fsnosync" value="false"></property>
    <property name="cacheid.versionhistory"></property>
    <property name="prefix" value="/documents"></property>
    <property name="fsContentCacheMaxEntries" value="-1"></property>
    <property name="fsContentCache"></property>
    <property name="name" value="documents"></property>
    <property name="cacheid.content"></property>
    <property name="compressLimit" value="-1"></property>
    <property name="cacheid.foldercontent"></property>
    <property name="cacheid.properties"></property>
    <property name="active" value="true"></property>
    <property name="cacheid.rid"></property>
    <property name="ignorerootdisplayname" value="false"></property>
    <property name="class" value="com.sapportals.wcm.repository.manager.cm.CmRepositoryManager"></property>
    <property name="cclist"></property>
    <property name="intLinksDefaultDynamic" value="true"></property>
    <property name="contentmgr.class" value="com.sapportals.wcm.repository.manager.cm.CmNamespaceAndContentManager"></property>
    <property name="cacheid.documents"></property>
    <property name="versioningmgr.class" value="com.sapportals.wcm.repository.manager.cm.CmVersioningManager"></property>
    <property name="securitymgr.w2kcfg.systemid"></property>
    <property name="lockmgr.class" value="com.sapportals.wcm.repository.manager.cm.CmLockManager"></property>
    <property name="cacheid.locks"></property>
    <property name="securitymgr.class"></property>
    <property name="persistence.db.instance-id" value="documents"></property>
    <property name="cacheid" value="ca_cm"></property>
    <property name="namespacemgr.class" value="com.sapportals.wcm.repository.manager.cm.CmNamespaceAndContentManager"></property>
    <property name="autoversioning" value="false"></property>
    <property name="description"></property>
    <property name="securitymgr.ref" value="AclSecurityManager"></property>
    <property name="fsContentCacheLimit" value="100"></property>
    <property name="propertymgr.class" value="com.sapportals.wcm.repository.manager.cm.CmPropertyManager"></property>
    <property name="services" value="accessstatistic, com.dkv.DKVApprovalAndTranslation, com.dkv.jobtool.repository.JobToolCreationService, comment, discussion, feedback, layout, personalnote, properties, rating, statemngt, subscription, svc_acl, tbp"></property>
    <property name="sendevents" value="true"></property>
    </Configurable>
    This is a DB repository. The config object for a filesystem repository might differ.
    Step 2, the creation of the initial file structure may be done with in two different ways:
    a) Include a Repository Service with your repository, which creates the folder structure on the first access of your repository.
    b) Include a Portal app which has to be called once to create the folder structure.
    For more info about using the API to create km folders take at look at this:
    https://www.sdn.sap.com/irj/sdn/thread?threadID=933638&messageID=5663711#5663711
    Cheers,
      Jürgen

Maybe you are looking for

  • Hangs on white screen with Apple logo while booting

    I can not get my Mac Pro Quad Core to boot up. It gets to the plain white screen with the Apple logo and will not go any further. I shut down the computer and unplugged it before a bad thunderstorm. Since then I haven't gotten it to boot up just once

  • Safari 3.1 upgrade puts you in a spin

    Yes the **** spinning beach ball once you visit the first webpage and about min later the popup window "Confirm Application Change" This is for keychain access and I click on Change All Now the spinning rainbow colored beach ball again for 2-3 mins,

  • Access a component inside external swf file

    Hi, I loaded a external swf file that it is a dialog. var swfLoader : Loader = new Loader(); var swfURL : URLRequest = new URLRequest("dialog.swf"); swfLoader.load(swfURL); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,imgLoaded); funct

  • Dont have my Prometric Testing ID.

    Hi, I am a OCA in Oracle 9i and planning to do OCA in Oracle 11g. I have seen the certification path, and its mentioned that if i have to write only one exam to get OCA in oracle 11g if i have completed 1Z0-007 exam already. But i dont have my promet

  • Cannot get album to transfer onto iPhone

    I have automatic synching set up in  iTunes for my entire music library. There are two new albums I have added to iTunes and I can see them sitting in my music library and I can play them through iTunes. However every time I sync my iphone and iTunes