Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework 5.0 DBContext template with WCF attributes Support

I am working on a Dot Net project with Entity Framewok 4.0 POCOs and WCF services in VS 2010. because of performance improvements and table valued function support i am going to switch to Ef 5.0 and VS 2012.

but i searched a lot and did not find any poco generator template or DBcontext generator template that support DataContract and DataMember attributes to use in VS 2012 and EF5.x.

[DataContract(IsReference = true)]
[KnownType(typeof(Transactions))]
public partial class Accounts 
  {
    [DataMember]
    public int AccountID { get; set; }

    [DataMember]
    public string AccountCode { get; set; }
  }

and my questions are :

1- is there any one who has such a template that works in VS2012 ?

2- does anyone know the changes required in EF 5.x DBContext generator to Customize the template to Support WCF needed attributes.

I have very little time and i realy need help.

thanks for any help or Guidance.

like image 572
saeed dastvar Avatar asked Mar 14 '13 13:03

saeed dastvar


1 Answers

I use VS 2012 and I downloaded the extension "EF 5.x DbContext Generator with WCF support" in order to generate POCOs entities already decorated with WCF attributes.

By using this context generator you do not need to further customize the template.

enter image description here

like image 65
Francesco Avatar answered Nov 08 '22 11:11

Francesco