Hi sureshMGR,
Anonymous types in C# are immutable and hence do not have property setter methods.
So you can't assign value to them.
You need to select the entity class and set its value to update.
Check this example. Now please take its reference and correct your code.
Database
For this example I have used of Northwind database that you can download using the link given below.
Download Northwind Database
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
CustomerEntities db = new CustomerEntities();
Customer customer = db.Customers.Where(a => a.CustomerID == 'ALFKI').Select(c => c).FirstOrDefault();
customer.ContactName = "Mudassar Khan";
customer.Country = "India";
db.SaveChanges();
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim db As CustomerEntities = New CustomerEntities()
Dim customer As Customer = db.Customers.Where(Function(a) a.CustomerID = "ALFKI"c).Select(Function(c) c).FirstOrDefault()
customer.ContactName = "Mudassar Khan"
customer.Country = "India"
db.SaveChanges()
End Sub