我有一个小的ASP.Net mvc3应用程序,我在编辑部分.我有默认模板:
public ActionResult Edit(int id)
{
User user = db.Users.Find(id);
return View(user);
}
public ActionResult Edit(User user)
{
//(Here access to old user name for example)
db.Entry(user).State = EntityState.Modified;
db.SaveChanges();
}
Run Code Online (Sandbox Code Playgroud)
如果我执行user.name我有新值但我想在保存之前访问db值.
谢谢 !
perfmon计数器使用不同的NIC名称与ipconfig/all和c#系统调用相比,如下所示(这是来自ipconfig/all)
Run Code Online (Sandbox Code Playgroud)Ethernet adapter HHHH: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : HP NC364T PCIe Quad Port Gigabit Server Adapter #3 Physical Address. . . . . . . . . : 00-1F-29-0D-26-59 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes IPv4 Address. . . . . . . . . . . : 166.49.47.10(Preferred) Subnet …
我需要写一个查询,我需要找到'字符.
像Shivam一样 - 我需要找到'标记'.
select * from DTCountries where CountryCode like '%'%'
Run Code Online (Sandbox Code Playgroud)