Example #1
0
 public void AddSimcha(Simcha simcha)
 {
     using (var context = new SimchaDataContext(_connectionString))
     {
         context.Simchas.InsertOnSubmit(simcha);
         context.SubmitChanges();
     }
 }
Example #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;
     }
 }
Example #3
0
 partial void DeleteSimcha(Simcha instance);
Example #4
0
 partial void UpdateSimcha(Simcha instance);
Example #5
0
 partial void InsertSimcha(Simcha instance);