Results 1 to 4 of 4

Thread: how to update View in MVC 4

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Location
    Karachi
    Posts
    551

    how to update View in MVC 4

    Hi to every one ,

    I have started small ASP.net MVC 4 application(using EF Model) ..and and for simplicity purpose i added few fields ..customer name ,Mobile,Address and ofcourse id as auto generated .and using Stored Procedure i have IUD operation ..NOw, in VS 2012 by using Server Explorer i can well easily see these fields ..and started on that ..means all db operation on above mentioned columns, i can have ..when i run the project ..

    Later one ,I moved bit ahead and add one more field called Active(want to have check box on UI) in database ..and update all stored procedure as per according ..this time again i can well see added column in server explorer in VS 2012 ..now I want rest of the application updated itself ..for example Model and other .cshtml files(s) in view folder..because so far i m not getting added field while run the project ..

    can any one give me way out for above problem ??????
    There is no achievement without goals

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Location
    Karachi
    Posts
    551

    Re: how to update View in MVC 4

    Let me refershing an error screen ..and share on this forum

    Error 1 Error 2019: Member Mapping specified is not valid. The type 'Edm.String[Nullable=True,DefaultValue=,MaxLength=,Unicode=,FixedLength=]' of member 'Active' in type 'CustomerModel1.CustomerTBL' is not compatible with 'SqlServer.int[Nullable=True,DefaultValue=]' of member 'Active' in type 'CustomerModel1.Store.CustomerTBL'. C:\Webs\MVCStoreProcedure\MVCStoreProcedure\Models\CustomerTBLModel.edmx 80 17 MVCStoreProcedure

    Error 2 Error 3002: Problem in mapping fragments starting at line 46:Potential runtime violation of table CustomerTBL's keys (CustomerTBL.id): Columns (CustomerTBL.id) are mapped to EntitySet CustomerTBLs's properties (CustomerTBLs.id) on the conceptual side but they do not form the EntitySet's key properties (CustomerTBLs.Customername, CustomerTBLs.id).
    C:\Webs\MVCStoreProcedure\MVCStoreProcedure\Models\Model.edmx 47 15 MVCStoreProcedure

    so the gist of that i m getting two error rather than one NOW,
    There is no achievement without goals

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,951

    Re: how to update View in MVC 4

    Error 1 - looks like on one side it thinks it should be a string, and on the other it should be a boolean.

    Not sure about Error 2... could be related to #1 though.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Location
    Karachi
    Posts
    551

    Re: how to update View in MVC 4

    well i delete and then re-add model.edmx.but not getting add-on field i.e Active on screen..neither found on display ,add,delete etc ect ..apart from that do u think if i added field in db ..I needed to manually update all .cshtml files in project so that it reflect on screen..??
    There is no achievement without goals

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width