locked
Create model at runtime of web API RRS feed

  • Question

  • I am new to Web API. I have done a few sample projects creating a basic web api. But what I am really wanting to try to d is create a model with parameters supplied to the Web API.

    So for example, If I make the following call to my Web API

    $.ajax({
        type: "GET",
        url: "MYWebAPI",
        data: { modelName: 'Products', properties: 'ProductName, ProductID' },
        dataType: "json",
        contentType: "application/json;",
    });

    Can I have my controller create a model called Products with the properties of ProductName and ProductID. Please be gentle. I'm just trying to learn :)

    Also, If this is in the wrong forum, please move it to the right one.  Couldn't figure out where to put it.  Thanks

    • Moved by Eyal Solnik Wednesday, February 12, 2014 1:26 AM Irrelevant to C#
    Wednesday, February 12, 2014 1:09 AM

Answers

  • Hello,

    You may want to post ASP.NET questions at forums.asp.net because you have greater chances to get an answer.

    The C# forum is not the right place for it. :)


    Regards, Eyal Shilony

    • Marked as answer by chuckw87 Wednesday, February 12, 2014 1:32 AM
    Wednesday, February 12, 2014 1:25 AM