コード例 #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);