Link to home
Start Free TrialLog in
Avatar of stoffel_cc
stoffel_cc

asked on

Linq to SQL: object.Tolist manipulation not possible

When I try to work with the returned list from the query i can't change it's property
While the class has a get and set property

even when i create a copy i cant change the polygon property is there a way to create a copy without the readonly property.

so i can use the changed data further in my code

Thanks in advance
===========APPLICATION CODE============
=======================================
 Dim cityList = (From c In cities _
        Select c.name, c.polygon).Take(100).ToList
 
        Try
        Dim point As New ArrayList()
        '..... some manipulation                
        cityList(i).polygon = point
        Catch ex As Exception
 
        End Try
 
 
 
 
======================================
===========MAPPING CLASS==============
======================================
<Column(Storage:="_polygon", AutoSync:=AutoSync.Always, DbType:="NVarChar(MAX)", IsDbGenerated:=true, UpdateCheck:=UpdateCheck.Never)>  _
	Public Property polygon() As String
		Get
			Return Me._polygon
		End Get
		Set
			If (String.Equals(Me._polygon, value) = false) Then
				Me.OnpolygonChanging(value)
				Me.SendPropertyChanging
				Me._polygon = value
				Me.SendPropertyChanged("polygon")
				Me.OnpolygonChanged
			End If
		End Set
	End Property

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi stoffel_cc;

have you tried my solution?

Fernando