Пример #1
0
        public void AddCampaign()
        {
            using (var db = new DragonDBModel())
            {
                CAMPAIGN newCampaign = new CAMPAIGN
                {
                    cmp_name        = _view.CampaignTitle,
                    cmp_dm          = _view.DungeonMaster,
                    cmp_startdate   = DateTime.Now,
                    cmp_description = _view.CampaignDescription
                };

                db.CAMPAIGN.Add(newCampaign);
                db.SaveChanges();
            }
        }
Пример #2
0
        public void Add()
        {
            var featToAdd = new FEATS
            {
                f_name        = _view.FeatName.Text,
                f_source      = _view.FeatSource.Text,
                f_description = _view.FeatDescription.Text
            };

            using (var db = new DragonDBModel())
            {
                db.FEATS.Add(featToAdd);

                db.SaveChanges();
            }

            //todo: reenable this
            //_parentView.Reload();
        }