Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8896971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:12:47+00:00 2026-06-15T00:12:47+00:00

Currently I have one Windows Azure Cloud Service Project (Service1) that will put messages

  • 0

Currently I have one Windows Azure Cloud Service Project (Service1) that will put messages into a storage queue (to be pulled by another cloud service), and then later pull messages out of a different storage queue. Based on the messages received by this service, an object may be added to a SQL Azure Database. So Far I have adding to the Queue working, and I have created a service library that contains the Entity DataModel for the SQL Database which so far only has one table, tblCustomers. This Project has a web role to display the customers coming in, and a worker role to send customers to another service for proccesing. I serialize a customer Object into xml using XMLSerializer, and send that xml message to the Queue. Serialization code:

//Serialize Lead to XML
            StringBuilder sbLead = new StringBuilder();
            var serializer = new XmlSerializer(typeof(Lead));
            using (var writer = XmlWriter.Create(sbLead))
            {
                serializer.Serialize(writer, objLead);
            } 
            String xml = sbLead.ToString();

            //Create and send message
            var message = new CloudQueueMessage(xml);
            clarityQueue.AddMessage(message);

Customer Entity Object Definition:

public partial class Customer
    {
        public int ID { get; set; }
        public string FirstName { get; set; }
        public string MiddleName { get; set; }
        public string LastName { get; set; }
        public string AddressLine1 { get; set; }
        public string AddressLine2 { get; set; }
        public string ZipCode { get; set; }
        public string EmailAddress { get; set; }
        public string HomePhone { get; set; }
        public string CellPhone { get; set; }
        public string SSN { get; set; }
        public string DateOfBirth { get; set; }
        public string IDState { get; set; }
        public string IDNum { get; set; }
        public string Status { get; set; }
        public Nullable<System.DateTime> DateCreated { get; set; }
        public Nullable<System.DateTime> DateApproved { get; set; }
    }

Now I need to pull that message out of the Queue with a different service (Service2) and deserialize it. The problem is, that as of right now Service2 has no idea how to deserialize the Lead, because it does not know how a lead is structured. I understand that I could add the service library DLL from Service1 into service 2, and my problem would be solved, but then i have to copy over a DLL everytime the Entity Framework changes, which will probably be quite often. I think that having a seperate entity model in both projects is bad practice, but I also don’t feel like a WCF service library is appropriate because i would need the Cloud service, and the WCF service both running, and at that point I might as well make the whole project a WCF service. And thats not the goal.

My Question is, what is the best practice for using entity objects in multiple different solutions (Service1 and Service2 must be in separate solutions)? I feel like this is a somewhat common problem, but after going through the Azure Training kit, and searching online for hours, i havent come up with anything.

EDIT:
To Clear things up, All I am looking for is a way to Send an Entity Object from one azure cloud service to another Using Storage Queues. That is Send A customer Object From Service1, to a StorageQueue, and then Retrieve that same Customer Object From that StorageQueue using Service 2. The Services are in two separate solutions. I need to know how to define Customer (which is an object represented by a table in a database) in both Service1 and Service2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:12:48+00:00Added an answer on June 15, 2026 at 12:12 am

    One approach is to have a seperate project that would contain the Entity classes, plus other stuff (like repositories, enums, constants, … etc)

    For example, if your project is called “MyService”, you would have 3 projects: MyService, MyService.FrontEnd, MyService.Worker. The database entities code would live in MyService and the two other projects would include that project as a reference (do not browse to the bin folder and add the .dll as a reference. Visual studio allows you to reference other projects within the same solution, that way you don’t have to copy the dll or run into out of sync issues where the build order is incorrect)

    That’s the approach that I’ve been using on multiple cloud projects for few years now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have one project that currently contains multiple packages. These packages make up
I have a WP7 application which consumes a Windows Azure web service. I've currently
We currently have an application (Windows service) that connects to another of our applications
We are currently evaluating upgrading from XP to Windows 7, but have one last
I currently have the following in one solution: Core Project (data access, biz logic,
I (currently) have two forms, one that needs to call the other. In other
I currently have a Windows Service which continually runs throughout the day. It has
Currently I'm trying to port a web application(ASP.NET MVC) to windows azure and have
I currently have a Windows Application that uses TCP Sockets to connect users and
I have an ASP.NET MVC 3 application, WouldBeBetter.com , currently hosted on Windows Azure.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.