var context1=new MyContext();
var context2=new MyContext();
var entity1=context1.Entities1.First();
entity1.Field1=5;
context2.SaveChanges();
context2.Entry(entity1).State = EntityState.Modified;
context2.SaveChanges();
[HttpPost]
public ActionResult Create(ModelClass model)
{
if (!ModelState.IsValid)
{
return View(model);
}
..............................................
}
public class ModelClass
{
publis string Name { get; set; }
}
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:80"
},
var result = context.Users.Include(...).Where(...);
foreach(User u in result)
{
u.Name="Domain\\"+Name;
}
await context.SaveChangesAsync();