???????????????????????????з?????????????????Ч?????????????????????????????????????????и????????????????ж????????п?????????????????????????????????????????????????????

Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

??????????????У???????????????????????????????н??У???????????????????????????????????????ж?д???????????????????????????????????????????????н??У????????????????????????????????????????????????????????????

????????????÷??????????????????д?????????????????????????У?Feathers????д????

??????????е?????еò??????????????

??Щ??????????????????????????????????Щ??????????????

??1??????????н?????

??2?????????????????

??3???????????????

??4??????????????????????????????????????????е??

??????????Feathers?????????????????????????н?????????????????????Щ????????ò???Mock???????????????????????????Щ?????????????????????????????????????????????????????????????????????????Χ?????????????????????????????????????????y???Щ??????????????????????????У?????????y????????????????????????????????????????????????

?????????????????????????????????????????????е??????????????????????Mock?????????????????????????????????

???????????У?????????Fixture????????????????????磬?????????????Client??Associate?????????????Щ????????????磺

[Fixture(typeof(client_hastings))]
public Client client;

[Fixture(typeof(Samuel))]

public Associate Samuel;

???Fixture???????????????????????????????ζ??????????????в?????????????????????????????Client???Associate?????д??????????????????ò??з?????С?????????????????????????Client??Associate???Fixture??????????????????????????????????????????????????????????A??????????????Client->Associate??B??????????????Associate->Client???????????????

?????????????????????????????????????????????????????????????????????????γ?????????????????A??????????1??????????????????2?????????????B??????????2????????????????1?????????1?????????A???????????????B????????????A???????????2???????е????B???У????????????????????????????????????е????????????????????????????????SQL Server Profiler??????????????С???????????????????????????????Trace Properties?й????Deadlock Graph?????Lock?? Deallock???????????????

????Trace?????ò??з?????е???????????????????Deadlock graph??

??У?????????????????????δ??????????????????????棬???????????????????????????????????????????????????????????????????????????????????????????????и?????????????????????????????????????????????γ????????????????????????????????

???????????????Fixture???????????????????????????????????????????????????????д????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????в????????????Ч????????????????Agent????????????????????????????????????????????

????????????ζ??????????????????????г??????????????????????????????????????????????????????????????Σ?????????????????????????????????в?????????????????????????????????????????????????????????????????????????????У??б????????????????????Щ??????????淶д????????????????????????????????β??????е?????????????????????