Format:
Recent snippets matching tags of EF4
' I watched Karl's video about validation with custom rules, and wondered ' why Silverlight, ASP.NET and ASP.NET MVC had DataAnnotations, and ' WPF only had IDataErrorInfo. So I thought of using EF4 as the model, ' and generating a metadata class like in RIA, MVC, etc for WPF and a ' inheritable generic class to convert the validations between IDataErrorInfo ' and the DataAnnotation attributes. ' ' This way validation can happen the same way for each type of client! ' ' Let me know what you think please?
88 Views
no comments
[OperationContract] public Contact SaveContact(Contact entity) { string _EntitySetName = "Contacts"; using (MyContext _Context = new MyContext()) { switch (entity.ChangeTracker.State) { case ObjectState.Added:
164 Views
no comments
'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated from a template. ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Compare Binary
64 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
