Пример #1
0
 public void UpdateContributionAmount(int contributorId, int eventId, int amount)
 {
     using (var ctx = new EventDbDataContext(_connString))
     {
         var contr = new Contribution
         {
             ContributionAmount = amount,
             EventId            = eventId,
             ContributorId      = contributorId
         };
         ctx.Contributions.Attach(contr);
         ctx.Refresh(RefreshMode.KeepCurrentValues, contr);
         ctx.SubmitChanges();
     }
 }
 private void detach_Contributions(Contribution entity)
 {
     this.SendPropertyChanging();
     entity.Event = null;
 }
 private void attach_Contributions(Contribution entity)
 {
     this.SendPropertyChanging();
     entity.Contributor = this;
 }
 partial void DeleteContribution(Contribution instance);
 partial void UpdateContribution(Contribution instance);
 partial void InsertContribution(Contribution instance);