CreateWeb([Bind(webProperties)] WebPageAddressViewModel c) { if (!ModelState.IsValid) { return(View(c)); } c.ID = Guid.NewGuid().ToString(); var o = AddressObjectFactory.CreateWeb(c.ID, c.Url, c.ValidFrom, c.ValidTo); await addresses.AddObject(o); return(RedirectToAction("Index")); }
public void CreateWebTest() { var r = GetRandom.Object <WebPageAddressDbRecord>(); var o = AddressObjectFactory.CreateWeb( r.ID, r.Address, r.ValidFrom, r.ValidTo); Assert.IsInstanceOfType(o, typeof(WebAddressObject)); testVariables(o.DbRecord, r.ID, r.Address, r.ValidFrom, r.ValidTo); }