コード例 #1
0
        public void DeleteBegrotingsType(int begrotingNummer)
        {
            BegrotingsType begrotingstype = ctx.BegrotingsTypes.Find(begrotingNummer);

            ctx.BegrotingsTypes.Remove(begrotingstype);
            ctx.SaveChanges();
        }
コード例 #2
0
        public Actie AddActie(string actienaam, string informatie, double bedrag, BegrotingsType begrotingstype)
        {
            var actie = new Actie(actienaam, informatie, bedrag);

            if (begrotingstype.Acties == null)
            {
                begrotingstype.Acties = new List <Actie>();
            }
            begrotingstype.Acties.Add(actie);
            return(begrotingrepo.CreateActie(actie));
        }
コード例 #3
0
 public void ChangeBegrotingsType(BegrotingsType begrotingstype)
 {
     begrotingrepo.UpdateBegrotingsType(begrotingstype);
 }
コード例 #4
0
 public BegrotingsType AddBegrotingsType(BegrotingsType begrotingstype)
 {
     return(begrotingrepo.CreateBegrotingsType(begrotingstype));
 }
コード例 #5
0
 public BegrotingsType CreateBegrotingsType(BegrotingsType begrotingstype)
 {
     ctx.BegrotingsTypes.Add(begrotingstype);
     ctx.SaveChanges();
     return(begrotingstype);
 }
コード例 #6
0
 public void UpdateBegrotingsType(BegrotingsType begrotingstype)
 {
     ctx.Entry(begrotingstype).State = EntityState.Modified;
     ctx.SaveChanges();
 }