public void CreateTest()
        {
            var r = GetRandom.Object <EffectDbRecord>();
            var o = EffectObjectFactory.Create(r.ID, r.Name, r.ValidFrom, r.ValidTo);

            Assert.IsInstanceOfType(o, typeof(EffectObject));
            testVariables(o.DbRecord, r.ID, r.Name, r.ValidFrom, r.ValidTo);
        }
        //[ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind(properties)] EffectViewModel c)
        {
            if (!ModelState.IsValid)
            {
                return(View(c));
            }
            c.ID = Guid.NewGuid().ToString();
            var o = EffectObjectFactory.Create(c.ID, c.Name, c.ValidFrom, c.ValidTo);
            await repository.AddObject(o);

            return(RedirectToAction("Index"));
        }