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 8378813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:01:01+00:00 2026-06-09T16:01:01+00:00

I have a WP7 project, which will invoke a REST web service in Azure

  • 0

I have a WP7 project, which will invoke a REST web service in Azure (MVC4 WebApi).

My WP7 project has models that it serializes to JSON and then sends to the web service.

The web service deserializes the data sent from WP7 and instantiates the models again before saving them to Azure Table Storage.

How can I share the Model classes between the projects? Right now I’m just copying the cs files over, and I have to update both sets if I make a change to the models. I was hoping a simple class library project would be able to be referenced from both projects, but WP7 couldn’t handle that.

What should I do?

Thanks!

  • 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-09T16:01:03+00:00Added an answer on June 9, 2026 at 4:01 pm

    There are many solutions for this issue:

    • You could use a T4 template to read the entity and generate a class your WP7 project that only contains the properties of the object without reference to the Table Storage specifics (like TableStorageEntity): http://weblogs.asp.net/cibrax/archive/2009/03/11/code-generation-with-t4-an-entities-to-dto-example.aspx

    • You could split your entity over 2 files, one with the TableStorage specifics like TableStorageEntity and one file containing only the properties of the entity (use partial classes for this). Then you can add the file containing only the properties in your WP7 project as a link.

    • Create a DTO (or whatever you call it) class manually and use something like AutoMapper to map between the DTO and the TableStorage entity. Store the DTO in a portable library so it can be used by every kind of project. In my opinion this is the best solution since you don’t want to completely expose your entities to “the outside world”. An example would be a list of users. You wouldn’t want to return all fields including password, hash… and other sensitive info. It would be better to have a separate class that only contains the info you want to expose externally.

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

Sidebar

Related Questions

I have 3 assemblies, a WP7 app (targeting 7.0), a Web Services project (running
I have a WP7 app that sometimes has to make a long (5-25 sec)
I am trying to use performance progressbar in a WP7 project but I have
I have several xaml pages in a WP7 MVVM project. I want to take
I have a WP7 app that is connecting to my GAE backend via oauth.
I have a WP7 XNA game that needs to save the state whenever the
Hi i have a WP7 application that calls a wcf who runs with membership
I have a user control in my wp7 application which contains two text boxes
I have built a WP7.1 application that uses a local database. I used sqlmetal
I have a .wsdl file defining a web service, and I want to generate

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.