This example shows you how to update multiple records in database table that satisfies given condition (where condition) in a single line by using LINQ query in entity framework.
In the above example all the records which contains given ProductID and IsActive "true" records will be updated with IsActive "false" and UpdatedTimeStamp with current DateTime.
In entity framework code first approach, while creating the instance of database context it will automatically create the database. To avoid creation of database simple add the below one line code in Global.asax.cs Application_Start() event.
In the above example Models.SampleModeEntities is dbcontext name, change the value with your model dbcontext name.