Пример #1
0
 public void AddSimcha(Simcha simcha)
 {
     using (var context = new SimchaDataContext(_connectionString))
     {
         context.Simchas.InsertOnSubmit(simcha);
         context.SubmitChanges();
     }
 }
Пример #2
0
 private void SetSimchaTotals(Simcha simcha)
 {
     using (var context = new ContributionDataContext(_connectionString))
     {
         simcha.Total             = context.Contributions.Any(c => c.SimchaId == simcha.Id) ? context.Contributions.Where(c => c.SimchaId == simcha.Id).Select(c => c.Amount).Sum() : 0;
         simcha.ContributorAmount = context.Contributions.Any(c => c.SimchaId == simcha.Id) ? context.Contributions.Count(c => c.SimchaId == simcha.Id) : 0;
     }
 }
Пример #3
0
 partial void DeleteSimcha(Simcha instance);
Пример #4
0
 partial void UpdateSimcha(Simcha instance);
Пример #5
0
 partial void InsertSimcha(Simcha instance);