1

I have Silverlight 5 application. It uses Entity framework "Model first". I added new column in entity in .edmx file, but i have 11009 error "property is not mapped". Google said that for mapping the property must be already in the table, so how i can add it? I have never worked with Silverlight and C# before, and need some help..

UDT: Apparently i wrote question not correctly. I know, that i have to add column in database table, but how? I dont have access for this in "Model browser"

I can do with table

  1. Delete
  2. Refresh model from DataBase
  3. Create database with the use of model (database is already existing *me)
  4. Add new code element
  5. Check
  6. Properties

UDT

I put the following code in XML.edmx file like Crud said

<Property Name="BPP" Type="varchar" MaxLength="19" /> in SSDL content <ScalarProperty Name="BPP" ColumnName="BPP" /> in C-S mapping content

But now i have Error 2009: Property on conceptual side, which is part of MSL, doesn't exists in MetadataWorkSpace

Artem Ruchkov
  • 581
  • 2
  • 7
  • 21

2 Answers2

0

You should add the new column in your database tables. After doing that update your edmx file.

Mico
  • 117
  • 1
  • 12
  • How? I dont have this opportunity in "Model browser". Is it possible in "Model First" Entity framework? – Artem Ruchkov Nov 05 '13 at 07:16
  • Hi. Why do you say that you do no have the opportunity? Can we get some screenshots and post it here. – Mico Nov 05 '13 at 07:19
  • Just saw this link here. http://stackoverflow.com/questions/9708189/how-do-you-update-an-edmx-file-with-database-changes – Mico Nov 05 '13 at 07:23
  • Hi, thanks for helping but here is "DataBase first" method, but i am using "Model First", so i dont know how i can change my Database – Artem Ruchkov Nov 05 '13 at 07:37
  • Hi Artem, Possible that you delete the model in the designer then add it again? – Mico Nov 05 '13 at 08:58
  • There are near 50 entities in the model, a lot of complex connections.. It`s not possible.. – Artem Ruchkov Nov 05 '13 at 09:08
0

If you already have the database so better to use DbFirst approch.it is easy to modify your model.in your case you can just update the database first ant simply you can update the model as well.

Any way if you want to alter the table with new column you should have to manually update the 2 of layers of edmx file.. Just open the edmx file as an xml and just add the inserted column details corresponding entity. You have to modify manually with the following layers.

  • SSDL content
  • C-S mapping content
Thilina H
  • 5,754
  • 6
  • 26
  • 56