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

  • Home
  • SEARCH
  • 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 832453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:21:54+00:00 2026-05-15T04:21:54+00:00

I created and love my Asp.Net MVC2 application. It’s a very nice DDD app

  • 0

I created and love my Asp.Net MVC2 application. It’s a very nice DDD app with Domain Model classes, View Model classes, a repository, and Json action methods to expose data.

My coworker wants to share my data with his Asp.Net Forms based C# code. He wants to pull through the Internet a class definition (like a Data Contract), then fill it with my Json results, effectively using something like a remote repository.

Any links or ideas on how to provide him with data contracts and data?

Darin Dimitrov had an excellent idea of consuming JSON data using data contracts here. Just wondering if it’s possible to use MVC as the source for these items, then let him create the objects on his side, filled with data from my side.

The key to this question is how to send him my data classes, then send him my data.

class Program
{
    [DataContract]
    class Person
    {
        [DataMember(Name = "name")]
        public string Name { get; set; }
        [DataMember(Name = "surname")]
        public string Surname { get; set; }
        [DataMember(Name="age")]
        public int Age { get; set; }
    }

    static void Main(string[] args)
    {
        var json = @"{""name"" : ""michael"", ""surname"" : ""brown"", ""age"" : ""35""}";

        var serializer = new DataContractJsonSerializer(typeof(Person));
        using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(json)))
        {
            var person = (Person)serializer.ReadObject(stream);
            Console.WriteLine("Name : {0}, Surname : {1}, Age : {2}", 
                person.Name, person.Surname, person.Age);
        }
    }
}
  • 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-05-15T04:21:55+00:00Added an answer on May 15, 2026 at 4:21 am

    Write an OData service. The format is JSON, but the tools to consume it easily — from many languages — are already written for you.

    The nice thing about this is that your data is now not only consumable by your JS and your friend’s ASP.NET app, it’s consumable by Excel, PHP, etc.

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

Sidebar

Related Questions

I find the SqlCacheDependency very useful when writing C# ASP.NET applications, and would love
I created a simple .NET windows application in Visual Studio 2005 and on just
I have an asp.net mvc 2.0 application that contains Areas/Modules like calendar, admin, etc...
The more I use ASP.NET MVC, the more I love it. However, in the
I know that ASP.NET MVC will allow me to swap in various View engines
In my ASP.NET MVC 2 web application, I allow users to create custom input
I need to quickly wrap some security around an existing ASP.Net 2.0 web app.
I created a Rails application normally. Then created the scaffold for an event class.
I created the setup project for the application and I can see that the
I have an ASP.NET MVC project in C# using Forms Authentication and Active Directory

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.