How to use lamda expression for updating using LINQ
This is small example showing how we use lamda expression in the programming section , Generally we use lamda expression when working wiht LINQ , or the classs of list type where need to get the data based on any where clause.
public Boolean Update(string id)
{
int flag = 0;
string str = DateTime.Now.Day + "-" + DateTime.Now.Month + "-" + DateTime.Now.Year;
foreach (var c in obj.Task_Details.Where(x => x.task_no == id))
{
c.task_date = str;
flag = 1;
c.status = "Complete";
}
obj.SaveChanges();
if (flag == 1)
{
return true;
}
else
{
return false;
}
}
This comment has been removed by a blog administrator.
ReplyDeletecan u please tell me ..how to create materialized view in sql server
ReplyDeletejust write the select query generally touching the base table as materialized view is a view that contains the result of any query ..for example calling a data set on your local machine from a remote based database.
Deletefor further references click the below link .
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/923ce3e3-432d-4377-b4bf-cc6edc7c07b2/materialized-view-in-sql-server?forum=transactsql
And can u tell me how to use ext.net to give dynamic effects using xaml
ReplyDeleteplease explain your query in detail..
ReplyDelete