Language: C#
Domain Service methods snippet
#region $entity$ public IQueryable<$entity$> Get$entities$() { return this.DataContext.$entities$; } public void Insert$entity$($entity$ current$entity$) { this.DataContext.$entities$.InsertOnSubmit(current$entity$); } public void Update$entity$($entity$ current$entity$) { this.DataContext.$entities$.Attach(current$entity$, this.ChangeSet.GetOriginal(current$entity$)); } public void Delete$entity$($entity$ current$entity$) { this.DataContext.$entities$.Attach(current$entity$); this.DataContext.$entities$.DeleteOnSubmit(current$entity$); } #endregion
Tags:
Description:
Paste this in as a VS snippet for creating crud methods.
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

