{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3389","repository_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate","labels_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3389/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3389/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3389/events","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3389","id":324243947,"number":3389,"title":"update() method Bug","user":{"login":"andyliyuze","id":7930890,"avatar_url":"https://avatars0.githubusercontent.com/u/7930890?v=4","gravatar_id":"","url":"https://api.github.com/users/andyliyuze","html_url":"https://github.com/andyliyuze","followers_url":"https://api.github.com/users/andyliyuze/followers","following_url":"https://api.github.com/users/andyliyuze/following{/other_user}","gists_url":"https://api.github.com/users/andyliyuze/gists{/gist_id}","starred_url":"https://api.github.com/users/andyliyuze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyliyuze/subscriptions","organizations_url":"https://api.github.com/users/andyliyuze/orgs","repos_url":"https://api.github.com/users/andyliyuze/repos","events_url":"https://api.github.com/users/andyliyuze/events{/privacy}","received_events_url":"https://api.github.com/users/andyliyuze/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-05-18T01:55:23Z","updated_at":"2018-05-18T03:12:53Z","closed_at":null,"author_association":"NONE","body":"firstly, if  I get a enetity used AsNoTracking() .\r\n just like that: ` return await this.Context.BailunOrders.AsNoTracking().Where(a => a.OriginOrderNo == originNo.Trim()).FirstOrDefaultAsync();`\r\nand if I use Update(entity) to update the entity defined in IRepository but it doesnt work ~ that didn't change value in database .\r\nfinally I have to define a new Update method to resovle the issue"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/comments/390081674","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3389#issuecomment-390081674","issue_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3389","id":390081674,"user":{"login":"acjh","id":14091939,"avatar_url":"https://avatars0.githubusercontent.com/u/14091939?v=4","gravatar_id":"","url":"https://api.github.com/users/acjh","html_url":"https://github.com/acjh","followers_url":"https://api.github.com/users/acjh/followers","following_url":"https://api.github.com/users/acjh/following{/other_user}","gists_url":"https://api.github.com/users/acjh/gists{/gist_id}","starred_url":"https://api.github.com/users/acjh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acjh/subscriptions","organizations_url":"https://api.github.com/users/acjh/orgs","repos_url":"https://api.github.com/users/acjh/repos","events_url":"https://api.github.com/users/acjh/events{/privacy}","received_events_url":"https://api.github.com/users/acjh/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T03:12:53Z","updated_at":"2018-05-18T03:12:53Z","author_association":"CONTRIBUTOR","body":">> Design a value object as immutable (like the Address above) **if there is not a good reason for designing it as mutable**.\r\n\r\nThe alternative: \"*detach the previous owned entity entry first*\"\r\n\r\n```c#\r\nvar context = (_bailunOrderRepository as IRepositoryWithDbContext).GetDbContext();\r\ncontext.Entry(order.Buyer).State = EntityState.Detached;\r\ncontext.Entry(order.PayMentInfo).State = EntityState.Detached;\r\n```"}}
{"actor":{"display_login":"acjh"}}