{"id":3016,"date":"2013-03-29T15:42:24","date_gmt":"2013-03-29T11:12:24","guid":{"rendered":"https:\/\/day.ir\/blog\/?p=3016"},"modified":"2022-12-25T15:07:14","modified_gmt":"2022-12-25T11:37:14","slug":"codefirst-wcf","status":"publish","type":"post","link":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/","title":{"rendered":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF"},"content":{"rendered":"<h1><span style=\"color: #02589f;\">\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF<\/span><\/h1>\n<h2><span style=\"color: #02589f;\">WCF \u0686\u06cc\u0633\u062a\u061f<\/span><\/h2>\n<p>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF\u00a0 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0628\u0627 WCF\u00a0 \u0622\u0634\u0646\u0627 \u0647\u0633\u062a\u06cc\u0645 \u0648\u0644\u06cc \u0628\u0647 \u062c\u0647\u062a \u062d\u0641\u0638 \u0633\u0627\u062e\u062a\u0627\u0631 \u0645\u0642\u0627\u0644\u0647 \u0630\u06a9\u0631 \u0627\u06cc\u0646 \u0646\u06a9\u062a\u0647 \u0636\u0631\u0648\u0631\u06cc \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0631\u0633\u062f: WCF \u06cc\u0627 Windows Communication Foundation \u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0633\u0631\u0648\u06cc\u0633 \u06af\u0631\u0627 \u0648 \u0632\u06cc\u0631 \u0645\u062c\u0645\u0648\u0639\u0647 \u067e\u0631\u0648\u0698\u0647 .net Frametword \u0627\u0633\u062a. \u0645\u06cc \u062a\u0648\u0627\u0646 \u0633\u0631\u0648\u06cc\u0633 WCF \u0631\u0627 \u062f\u0631 \u0648\u0628 \u0633\u0631\u0648\u0631 IIS \u0647\u0627\u0633\u062a \u06a9\u0631\u062f. wcf \u0627\u0632 \u067e\u0631\u0648\u062a\u0648\u06a9\u0644 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u06cc \u06a9\u0646\u062f \u0627\u0632 \u062c\u0645\u0644\u0639: HTTP, WS-HTTP, TCP, P2P, MSMQ<\/p>\n<h2><span style=\"color: #02589f;\">CodeFirst<\/span><\/h2>\n<p>\u0645\u0627\u06cc\u06a9\u0631\u0648\u0633\u0627\u0641\u062a \u062f\u0631 \u0646\u0633\u062e\u0647 Entity Framework 4.1 \u0628\u0631\u0627\u06cc \u0627\u0648\u0644\u06cc\u0646 \u0628\u0627\u0631 <strong>\u06a9\u0644\u0627\u0633 DbContext<\/strong> \u0631\u0627 \u0645\u0639\u0631\u0641\u06cc \u06a9\u0631\u062f \u06a9\u0647 \u0634\u06cc\u0648\u0647 \u0646\u0648\u06cc\u0646\u06cc \u062c\u0647\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0628\u0648\u062f\u0647 \u0648 \u0628\u0627 \u0646\u0627\u0645 <strong>CodeFirst<\/strong> \u0634\u0646\u0627\u062e\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f. \u0627\u06cc\u0646 \u0634\u06cc\u0648\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0642\u0628\u0627\u0644 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u06af\u0631\u0641\u062a \u0648 \u062f\u0631 \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u0628\u0639\u062f\u06cc \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u062c\u0627\u0644\u0628 \u0641\u0631\u0627\u0648\u0627\u0646\u06cc \u0628\u0647 \u0622\u0646 \u0627\u0636\u0627\u0641\u0647 \u0634\u062f \u0648 \u0647\u0645 \u0627\u06a9\u0646\u0648\u0646 \u0646\u06cc\u0632 \u062f\u0631 \u062d\u0627\u0644 \u062a\u0648\u0633\u0639\u0647 \u0648 \u0628\u0647\u06cc\u0646\u0647 \u0633\u0627\u0632\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f.<\/p>\n<p>\u06cc\u06a9\u06cc \u0627\u0632 \u0645\u0634\u06a9\u0644\u0627\u062a \u06a9\u0627\u0631 \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 \u0647\u0627\u06cc ORM \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u0645\u0639\u0645\u0648\u0644\u0627 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u0627\u06cc\u0647 \u0627\u06cc \u0628\u0647 \u0627\u0631\u062b \u0631\u0641\u062a\u0647 \u0627\u0646\u062f \u0648 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0628\u0627\u0639\u062b \u0645\u06cc \u0634\u0648\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0628\u0647 \u0633\u0627\u062f\u06af\u06cc \u0642\u0627\u0628\u0644 \u0627\u0646\u062a\u0642\u0627\u0644 \u0627\u0632 \u0633\u0645\u062a \u0633\u0631\u0648\u06cc\u0633 \u0628\u0647 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0646\u0628\u0627\u0634\u0646\u062f \u0648 \u0647\u0632\u06cc\u0646\u0647 \u0633\u0631\u06cc\u0627\u0644\u0627\u06cc\u0632 (Serialize) \u0648 \u062f\u06cc \u0633\u0631\u06cc\u0627\u0644\u0627\u06cc\u0632 (Deserialize) \u0646\u0645\u0648\u062f\u0646 \u0627\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0646\u06cc\u0632 \u0628\u0633\u06cc\u0627\u0631 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a.<\/p>\n<p>\u0628\u0647 \u0647\u0645\u06cc\u0646 \u062f\u0644\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0647\u0645\u0648\u0627\u0631\u0647 \u0645\u0648\u0631\u062f \u0639\u0644\u0627\u0642\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0628\u0648\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u0627\u06cc\u0647 \u062e\u0648\u062f (POCO) \u0648 \u0628\u062f\u0648\u0646 \u0647\u06cc\u0686 \u0633\u0631\u0628\u0627\u0631 \u0627\u0636\u0627\u0641\u06cc \u0628\u0647 \u062c\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u06cc\u0634 \u0641\u0631\u0636 \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 Entity Framework \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u0646\u062f.<\/p>\n<p>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 CodeFirst \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u0646\u0645\u0648\u062f. \u0628\u0631\u0627\u06cc \u062f\u0631\u06a9 \u0628\u0647\u062a\u0631 \u0645\u0633\u0626\u0644\u0647\u060c \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>\u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u062f\u0648 \u06a9\u0644\u0627\u0633 \u0628\u0647 \u0646\u0627\u0645 \u0647\u0627\u06cc Customer \u0648 Address \u062f\u0627\u0631\u06cc\u0645 \u0648 \u0628\u0647 \u0627\u0632\u0627\u06cc \u0627\u06cc\u0646 \u062f\u0648 \u06a9\u0644\u0627\u0633\u060c \u062f\u0648 \u062c\u062f\u0648\u0644 \u062f\u0631 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0628\u0627 \u0647\u0645\u06cc\u0646 \u0646\u0627\u0645 \u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f. \u0631\u0627\u0628\u0637\u0647 \u0628\u06cc\u0646 \u062c\u062f\u0648\u0644 Customer \u0628\u0627 \u062c\u062f\u0648\u0644 Address \u0627\u0632 \u0646\u0648\u0639 &#8220;\u06cc\u06a9 \u0628\u0647 \u0686\u0646\u062f&#8221; \u0645\u06cc \u0628\u0627\u0634\u062f \u06cc\u0639\u0646\u06cc \u0647\u0631 \u0645\u0634\u062a\u0631\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0686\u0646\u062f\u06cc\u0646 \u0622\u062f\u0631\u0633 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<h3><span style=\"color: #02589f;\">\u0646\u0645\u0648\u0646\u0647 \u06a9\u062f \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc CodeFirst<\/span><\/h3>\n<p>\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0627\u06cc\u0646 \u062c\u062f\u0627\u0648\u0644 \u062f\u0631 \u0631\u0648\u0634 CodeFirst \u0645\u0634\u0627\u0628\u0647 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0645\u06cc \u0628\u0627\u0634\u0646\u062f:<\/p>\n<p style=\"text-align: left;\">public partial class CustomerDBEntities : DbContext<\/p>\n<p style=\"text-align: left;\">{<br \/>\npublic DbSet&lt;Address&gt; Addresses { get; set; }<br \/>\npublic DbSet&lt;Customer&gt; Customers { get; set; }<br \/>\n}<br \/>\npublic class Customer<\/p>\n<p style=\"text-align: left;\">{<br \/>\npublic Customer()<br \/>\n{<br \/>\nthis.Addresses = new HashSet&lt;Address&gt;();<\/p>\n<p style=\"text-align: left;\">}<br \/>\npublic int CustomerId { get; set; }<br \/>\npublic string FirstName { get; set; }<br \/>\npublic string LastName { get; set; }<br \/>\npublic ICollection&lt;Address&gt; Addresses { get; set; }<\/p>\n<p style=\"text-align: left;\">}<br \/>\npublic class Address<\/p>\n<p style=\"text-align: left;\">{<br \/>\npublic int AddressId { get; set; }<br \/>\npublic int CustomerId { get; set; }<br \/>\npublic string Street { get; set; }<br \/>\npublic string Alley { get; set; }<br \/>\npublic int No { get; set; }<br \/>\npublic Customer Customer { get; set; }<br \/>\n}<\/p>\n<p style=\"text-align: right;\">\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Customer \u0648 Address \u0627\u0632 \u0647\u06cc\u0686 \u06a9\u0644\u0627\u0633 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0647 \u0627\u0631\u062b \u0646\u0631\u0641\u062a\u0647 \u0627\u0646\u062f \u0648 \u062f\u0627\u0631\u0627\u06cc \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u062f\u06cc\u06af\u0631\u06cc \u0646\u06cc\u0632 \u0646\u06cc\u0633\u062a\u0646\u062f \u0648 \u06a9\u0627\u0645\u0644\u0627 \u0645\u0646\u0627\u0633\u0628 \u0628\u0631\u0627\u06cc \u0645\u0646\u0638\u0648\u0631 \u0645\u0627 \u06cc\u0639\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc WCF \u0645\u06cc \u0628\u0627\u0634\u0646\u062f.<\/p>\n<p>\u062f\u0631 \u0648\u0631\u0634 \u0628\u0627\u0644\u0627 \u0686\u0646\u062f \u0645\u062d\u062f\u0648\u062f\u06cc\u062a \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u0634\u0648\u062f\u060c \u0627\u0632 \u062c\u0645\u0644\u0647 \u0627\u06cc\u0646\u06a9\u0647 \u0686\u0648\u0646 \u0645\u0648\u062c\u0648\u062f\u06cc\u062a \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u0627\u06cc\u0647 Entity Framework \u0628\u0647 \u0627\u0631\u062b \u0646\u0631\u0641\u062a\u0647 \u0627\u0646\u062f\u060c \u067e\u0633 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc Lazy Loading \u0648 Change Traking \u0627\u0632 \u06a9\u0627\u0631 \u0627\u0641\u062a\u0627\u062f\u0647 \u0627\u0646\u062f \u0648 \u062f\u06cc\u06af\u0631 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u06cc \u0628\u0627\u0634\u0646\u062f.<\/p>\n<h3><span style=\"color: #02589f;\">Lazy Loading<\/span><\/h3>\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a Lazy Loading \u0631\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0641\u0631\u0627\u0647\u0645 \u06a9\u0646\u06cc\u0645 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u0647 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a\u06cc \u0646\u0627\u0648\u0628\u0631\u06cc (Navigation Properties) \u0631\u0627 \u0628\u0647 \u0634\u06a9\u0644 virtual \u062f\u0631 \u0622\u0648\u0631\u06cc\u0645. \u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a \u06a9\u0647 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a\u06cc \u0646\u0627\u0648\u0628\u0631\u06cc\u060c \u0647\u0645\u0627\u0646 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a\u06cc \u0645\u06cc \u0628\u0627\u0634\u0646\u062f \u06a9\u0647 \u0646\u0645\u0627\u06cc\u0627\u0646\u06af\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0647\u0627 (\u0648 \u0627\u062d\u062a\u0645\u0627\u0644\u0627 \u062c\u062f\u0627\u0648\u0644 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647) \u0645\u06cc \u0628\u0627\u0634\u0646\u062f. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0645\u0627 \u0647\u0631 \u0645\u0634\u062a\u0631\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0686\u0646\u062f\u06cc\u0646 \u0622\u062f\u0631\u0633 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f \u0648 \u0647\u0631 \u0622\u062f\u0631\u0633 \u062d\u062a\u0645\u0627 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06cc\u06a9 \u0645\u0634\u062a\u0631\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u062e\u0635\u0648\u0635\u06cc\u062a Addresses \u062f\u0631 \u06a9\u0644\u0627\u0633 Customer \u0648 \u062e\u0635\u0648\u0635\u06cc\u062a Customer \u062f\u0631 \u06a9\u0644\u0627\u0633 Address \u0646\u0645\u0627\u06cc\u0627\u0646\u06af\u0631 \u0627\u06cc\u0646 \u0631\u0627\u0628\u0637\u0647 \u0628\u0648\u062f\u0647 \u0648 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a\u06cc \u0646\u0627\u0648\u0628\u0631\u06cc \u0645\u06cc \u0628\u0627\u0634\u0646\u062f.<\/p>\n<p>\u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0645\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Customer \u0648 Address \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u0627\u0639\u0645\u0627\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<p style=\"text-align: left;\">public class Customer<\/p>\n<p style=\"text-align: left;\">{public Customer()<br \/>\n{<br \/>\nthis.Addresses = new HashSet&lt;Address&gt;();<br \/>\n}<br \/>\npublic int CustomerId { get; set; }<br \/>\npublic string FirstName { get; set; }<br \/>\npublic string LastName { get; set; }<br \/>\npublic Vritual ICollection&lt;Address&gt; Addresses { get; set; }<\/p>\n<p style=\"text-align: left;\">}<br \/>\npublic class Address<\/p>\n<p style=\"text-align: left;\">{<br \/>\npublic int AddressId { get; set; }<br \/>\npublic int CustomerId { get; set; }<br \/>\npublic string Street { get; set; }<br \/>\npublic string Alley { get; set; }<br \/>\npublic int No { get; set; }<br \/>\npublic virtual Customer Customer { get; set; }<br \/>\n}<\/p>\n<h4><span style=\"color: #02589f;\">\u067e\u0631\u0648\u06a9\u0633\u06cc \u0647\u0627\u06cc \u067e\u0648\u06cc\u0627 Dynamic Proxies<\/span><\/h4>\n<p>\u0634\u0627\u06cc\u062f \u0627\u06cc\u0646 \u0633\u0648\u0627\u0644 \u062f\u0631 \u0630\u0647\u0646\u062a\u0627\u0646 \u0628\u0648\u062c\u0648\u062f \u0622\u0645\u062f\u0647 \u0628\u0627\u0634\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0641\u0642\u0637 \u0628\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0648\u062f\u0646 \u06a9\u0644\u0645\u0647 \u06a9\u0644\u06cc\u062f\u06cc virtual \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a Lazy Loading \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0645\u0627 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u0634\u0648\u062f\u061f!<\/p>\n<p>\u0628\u0627 virtual \u06a9\u0631\u062f\u0646 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u0646\u0627\u0648\u0628\u0631\u06cc\u060c <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/data-tools\/walkthrough-creating-a-wcf-data-service-with-wpf-and-entity-framework?view=vs-2022&amp;tabs=csharp\" target=\"_blank\" rel=\"noopener\">Entity Framework<\/a> \u0647\u0646\u06af\u0627\u0645 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 (RunTime) \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc\u06cc \u0628\u0627 \u0639\u0646\u0648\u0627\u0646 &#8220;\u067e\u0631\u0648\u06a9\u0633\u06cc \u0647\u0627\u06cc \u067e\u0648\u06cc\u0627&#8221; \u06cc\u0627 \u0647\u0645\u0627\u0646 Dynamic Proxies \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Address \u0648 Customer \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a Lazy Loading \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u062f\u0631 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc \u06af\u0631\u062f\u062f.<\/p>\n<p>\u062a\u0627 \u0627\u06cc\u0646\u062c\u0627\u06cc \u06a9\u0627\u0631 \u062a\u0648\u0627\u0646\u0633\u062a\u06cc\u0645 \u0628\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u06a9\u0648\u0686\u06a9\u06cc \u062f\u0631 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a Lazy Loading \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u06a9\u0646\u06cc\u0645 \u0648\u0644\u06cc \u0628\u0627 \u0627\u0636\u0627\u0641\u0647 \u0634\u062f\u0646 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0647\u0627\u06cc \u067e\u0648\u06cc\u0627 \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0645\u0627\u060c \u0645\u062c\u062f\u062f\u0627 \u0645\u0634\u06a9\u0644 \u0627\u0628\u062a\u062f\u0627\u06cc \u0645\u0642\u0627\u0644\u0647 \u067e\u062f\u06cc\u062f\u0627\u0631 \u0645\u06cc \u0634\u0648\u0646\u062f \u0648 \u0627\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0646\u062a\u0642\u0627\u0644 \u062e\u0648\u062f \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc WCF \u0631\u0627 \u0627\u0632 \u062f\u0633\u062a \u0645\u06cc \u062f\u0647\u0646\u062f \u0632\u06cc\u0631\u0627 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0647\u0627\u06cc \u067e\u0648\u06cc\u0627 \u0628\u0647 \u0637\u0648\u0631 \u067e\u06cc\u0634 \u0641\u0631\u0636 \u0642\u0627\u0628\u0644\u06cc\u062a \u0633\u0631\u06cc\u0627\u0644\u0627\u06cc\u0632 \u0648 \u062f\u06cc\u0633\u0631\u06cc\u0627\u0644\u0627\u06cc\u0632 \u0634\u062f\u0646 \u0631\u0627 \u0646\u062f\u0627\u0631\u0646\u062f!<\/p>\n<h5><span style=\"color: #02589f;\">\u0642\u0627\u0628\u0644\u06cc\u062a Change Tracking<\/span><\/h5>\n<p>\u0642\u0628\u0644 \u0627\u0632 \u0627\u06cc\u0646 \u06a9\u0647 \u0628\u0647 \u0633\u0631\u0627\u063a \u0631\u0627\u0647 \u062d\u0644 \u0628\u0631\u0648\u06cc\u0645 \u0628\u062f \u0646\u06cc\u0633\u062a \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0646\u06cc\u0632 \u0627\u0634\u0627\u0631\u0647 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u062a\u0645\u0627\u0645\u06cc \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 virtual \u06a9\u0646\u06cc\u0645\u060c \u0642\u0627\u0628\u0644\u06cc\u062a Change Tracking \u0646\u06cc\u0632 \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0645\u0627 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648\u0644\u06cc \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0648\u062f\u0646 \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0628\u0631 \u0631\u0648\u06cc \u0631\u0627\u0646\u062f\u0645\u0627\u0646 \u0648 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062a\u0627\u062b\u06cc\u0631 \u0645\u06cc \u06af\u0630\u0627\u0631\u062f.<\/p>\n<p>\u062e\u0648\u0634\u0628\u062e\u062a\u0627\u0646\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0644\u0627\u0633 DbContext \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u062a\u0648\u0644\u06cc\u062f \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u0631\u0648\u06a9\u0633\u06cc \u0631\u0627 \u062f\u0631 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0641\u0639\u0627\u0644 \u06cc\u0627 \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u0645. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u062a\u0646\u0647\u0627 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u0647 \u0647\u0631 \u0632\u0645\u0627\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0647\u0627 \u062f\u0631 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc WCF \u062f\u0627\u0634\u062a\u06cc\u0645\u060c \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0631\u0627 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u0627\u0632 \u06a9\u0627\u0631 \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u0645. \u062f\u0631 \u0627\u06cc\u0646\u0635\u0648\u0631\u062a \u0642\u0627\u0628\u0644\u06cc\u062a Lazy Loading \u0648 \u0628\u0631\u062e\u06cc \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0627\u0632 \u06a9\u0627\u0631 \u0627\u0641\u062a\u0627\u062f\u0647 \u0648 \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc WCF \u0631\u0627 \u062e\u0648\u0627\u0647\u0646\u062f \u062f\u0627\u0634\u062a.<\/p>\n<p style=\"text-align: left;\">public Customer GetFirstCustomer()<br \/>\n{ using(var context = new CustomerDBEntities())<br \/>\n{<br \/>\ncontext.Configuration.ProxyCreationEnabled = false;<br \/>\nvar firstCustomer = context.Customers.FirstOrDefault() return firstCustomer;<br \/>\n}<br \/>\n}<\/p>\n<p>\u062f\u0631 \u0645\u062a\u062f \u0628\u0627\u0644\u0627 \u0648\u06cc\u0698\u06af\u06cc ProxyCreationEnabled \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u0644\u0627\u0633 DbContext \u0631\u0627 \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u0645 \u0648 \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0647\u0627\u06cc \u062f\u0627\u06cc\u0646\u0627\u0645\u06cc\u06a9 \u062a\u0648\u0644\u06cc\u062f \u0646\u062e\u0648\u0627\u0647\u0646\u062f \u0634\u062f \u0648 \u0646\u062a\u06cc\u062c\u0647 \u06a9\u0648\u0626\u0631\u06cc \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc WCF \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f.<\/p>\n<p><strong>\u0647\u0631 \u06af\u0648\u0646\u0647 \u06a9\u067e\u06cc \u0628\u0631\u062f\u0627\u0631\u06cc \u0627\u0632 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062a\u0646\u0647\u0627 \u0628\u0627 \u062f\u0631\u062c \u0644\u06cc\u0646\u06a9 \u0627\u06cc\u0646 \u0635\u0641\u062d\u0647 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u0646\u0628\u0639 \u0627\u0632 \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645 \u0628\u0644\u0627\u0645\u0627\u0646\u0639 \u0627\u0633\u062a<\/strong><\/p>\n<p>\u0645\u0637\u0627\u0644\u0628 \u0645\u0631\u062a\u0628\u0637:<\/p>\n<p><a href=\"https:\/\/day.ir\/windows-host\" target=\"_blank\" rel=\"noopener\"><b>\u062e\u0631\u06cc\u062f \u0647\u0627\u0633\u062a \u0628\u0631\u0627\u06cc MVC<\/b><\/a><\/p>\n<p><strong><a href=\"https:\/\/day.ir\/blog\/web\/model-view-view-model\/\" target=\"_blank\" rel=\"noopener\">\u0645\u062f\u0644 \u0648\u06cc\u0648-\u0648\u06cc\u0648 \u0645\u062f\u0644 MVVM<\/a><\/strong><\/p>\n<p><a href=\"https:\/\/day.ir\/blog\/it\/becoming-freelancer\/\" target=\"_blank\" rel=\"noopener\"><b>\u0646\u06a9\u062a\u0647 \u0647\u0627\u06cc \u0641\u0631\u06cc \u0644\u0646\u0633\u0631\u06cc \u06cc\u0627 \u062f\u0648\u0631\u06a9\u0627\u0631\u06cc<\/b><\/a><\/p>\n<p><b><a href=\"https:\/\/day.ir\/blog\/web\/keypoints_design_website\/\" target=\"_blank\" rel=\"noopener\">\u0645\u0648\u0627\u0631\u062f \u0645\u0647\u0645 \u062f\u0631 \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a<\/a><\/b><\/p>\n<p><a href=\"https:\/\/day.ir\/blog\/web\/captcha-asp-net-mvc-4\/\" target=\"_blank\" rel=\"noopener\"><b>\u0633\u0627\u062e\u062a \u06a9\u067e\u0686\u0627<\/b><\/a><\/p>\n<p><a href=\"https:\/\/day.ir\/blog\/web\/wordpress-6-download-install\/\" target=\"_blank\" rel=\"noopener\"><b>\u0646\u0635\u0628 \u0648\u0631\u062f\u067e\u0631\u0633<\/b><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF WCF \u0686\u06cc\u0633\u062a\u061f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF\u00a0 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0628\u0627 WCF\u00a0 \u0622\u0634\u0646\u0627 \u0647\u0633\u062a\u06cc\u0645 \u0648\u0644\u06cc \u0628\u0647 \u062c\u0647\u062a \u062d\u0641\u0638 \u0633\u0627\u062e\u062a\u0627\u0631 \u0645\u0642\u0627\u0644\u0647 \u0630\u06a9\u0631 \u0627\u06cc\u0646 \u0646\u06a9\u062a\u0647 \u0636\u0631\u0648\u0631\u06cc \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3019,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-3016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645<\/title>\n<meta name=\"description\" content=\"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\" \/>\n<meta property=\"og:description\" content=\"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\" \/>\n<meta property=\"article:published_time\" content=\"2013-03-29T11:12:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-25T11:37:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"196\" \/>\n\t<meta property=\"og:image:height\" content=\"257\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"jafar broujerdi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"jafar broujerdi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/\"},\"author\":{\"name\":\"jafar broujerdi\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#\\\/schema\\\/person\\\/8896e645096b6a8528b1bb57617f4b8b\"},\"headline\":\"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF\",\"datePublished\":\"2013-03-29T11:12:24+00:00\",\"dateModified\":\"2022-12-25T11:37:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/\"},\"wordCount\":281,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cfirst.jpg\",\"articleSection\":[\"\u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/\",\"url\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/\",\"name\":\"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cfirst.jpg\",\"datePublished\":\"2013-03-29T11:12:24+00:00\",\"dateModified\":\"2022-12-25T11:37:14+00:00\",\"description\":\"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#primaryimage\",\"url\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cfirst.jpg\",\"contentUrl\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cfirst.jpg\",\"width\":196,\"height\":257,\"caption\":\"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/web\\\/codefirst-wcf\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\\\/\\\/day.ir\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/day.ir\\\/blog\\\/\",\"name\":\"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\",\"description\":\"\u0645\u0642\u0627\u0644\u0627\u062a \u0645\u0631\u062a\u0628\u0637 \u0628\u0627 \u0648\u0628\u060c \u0627\u06cc\u0645\u06cc\u0644\u060c \u062f\u0627\u0645\u0646\u0647\u060c \u0634\u0628\u06a9\u0647\u060c \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0648 ...\",\"publisher\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/day.ir\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#organization\",\"name\":\"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\",\"url\":\"https:\\\/\\\/day.ir\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/cropped-favicon.png\",\"contentUrl\":\"https:\\\/\\\/day.ir\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/cropped-favicon.png\",\"width\":511,\"height\":512,\"caption\":\"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645\"},\"image\":{\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/day.ir\\\/blog\\\/#\\\/schema\\\/person\\\/8896e645096b6a8528b1bb57617f4b8b\",\"name\":\"jafar broujerdi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g\",\"caption\":\"jafar broujerdi\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","description":"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/","og_locale":"fa_IR","og_type":"article","og_title":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","og_description":"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...","og_url":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/","og_site_name":"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","article_published_time":"2013-03-29T11:12:24+00:00","article_modified_time":"2022-12-25T11:37:14+00:00","og_image":[{"width":196,"height":257,"url":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg","type":"image\/jpeg"}],"author":"jafar broujerdi","twitter_card":"summary_large_image","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"jafar broujerdi","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"7 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#article","isPartOf":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/"},"author":{"name":"jafar broujerdi","@id":"https:\/\/day.ir\/blog\/#\/schema\/person\/8896e645096b6a8528b1bb57617f4b8b"},"headline":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF","datePublished":"2013-03-29T11:12:24+00:00","dateModified":"2022-12-25T11:37:14+00:00","mainEntityOfPage":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/"},"wordCount":281,"commentCount":0,"publisher":{"@id":"https:\/\/day.ir\/blog\/#organization"},"image":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#primaryimage"},"thumbnailUrl":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg","articleSection":["\u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/","url":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/","name":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF - \u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","isPartOf":{"@id":"https:\/\/day.ir\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#primaryimage"},"image":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#primaryimage"},"thumbnailUrl":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg","datePublished":"2013-03-29T11:12:24+00:00","dateModified":"2022-12-25T11:37:14+00:00","description":"\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF \u0628\u0631\u0627\u062d\u062a\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0627\u0631\u062b \u06a9\u0644\u0627\u0633 \u0647\u0627 \u0627\u0632 \u06a9\u0644\u0627\u06cc\u0646\u062a \u0628\u0647 ...","breadcrumb":{"@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/day.ir\/blog\/web\/codefirst-wcf\/"]}]},{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#primaryimage","url":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg","contentUrl":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2022\/12\/cfirst.jpg","width":196,"height":257,"caption":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF"},{"@type":"BreadcrumbList","@id":"https:\/\/day.ir\/blog\/web\/codefirst-wcf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/day.ir\/blog\/"},{"@type":"ListItem","position":2,"name":"\u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc Entity Framework CodeFirst \u062f\u0631 WCF"}]},{"@type":"WebSite","@id":"https:\/\/day.ir\/blog\/#website","url":"https:\/\/day.ir\/blog\/","name":"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","description":"\u0645\u0642\u0627\u0644\u0627\u062a \u0645\u0631\u062a\u0628\u0637 \u0628\u0627 \u0648\u0628\u060c \u0627\u06cc\u0645\u06cc\u0644\u060c \u062f\u0627\u0645\u0646\u0647\u060c \u0634\u0628\u06a9\u0647\u060c \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0648 ...","publisher":{"@id":"https:\/\/day.ir\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/day.ir\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"},{"@type":"Organization","@id":"https:\/\/day.ir\/blog\/#organization","name":"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645","url":"https:\/\/day.ir\/blog\/","logo":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/day.ir\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2024\/09\/cropped-favicon.png","contentUrl":"https:\/\/day.ir\/blog\/wp-content\/uploads\/2024\/09\/cropped-favicon.png","width":511,"height":512,"caption":"\u0648\u0628\u0644\u0627\u06af \u062f\u06cc \u062a\u0644\u06a9\u0627\u0645"},"image":{"@id":"https:\/\/day.ir\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/day.ir\/blog\/#\/schema\/person\/8896e645096b6a8528b1bb57617f4b8b","name":"jafar broujerdi","image":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/secure.gravatar.com\/avatar\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/163109584cb1bc8719ac5b0cb7d280a96523792861596b891d46ef3d55c7b1b2?s=96&d=mm&r=g","caption":"jafar broujerdi"}}]}},"_links":{"self":[{"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/posts\/3016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/comments?post=3016"}],"version-history":[{"count":9,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/posts\/3016\/revisions"}],"predecessor-version":[{"id":3147,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/posts\/3016\/revisions\/3147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/media\/3019"}],"wp:attachment":[{"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/media?parent=3016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/categories?post=3016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/day.ir\/blog\/wp-json\/wp\/v2\/tags?post=3016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}