Created
November 13, 2014 00:25
-
-
Save BryanWilhite/f038dc5740efe76872aa to your computer and use it in GitHub Desktop.
C#: RIA Services, EF and Partial Methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ServiceModel.DomainServices.Client; | |
using GalaSoft.MvvmLight.Messaging; | |
namespace My.Entities | |
{ | |
using My.Entities.Extensions; | |
using My.Silverlight.Models; | |
public sealed partial class MyEntity : Entity | |
{ | |
partial void OnCreated() | |
{ | |
var message = new LightNotificationMessageAction<string>("MyEntity", | |
s => | |
{ | |
this.SetDefaultValues(s); | |
}) | |
{ | |
Source = LightMessageSource.Model, | |
UniqueId = "Entity" | |
}; | |
Messenger.Default.Send(message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment