public ActionResult Create([Bind(Include = "Name,Description")] AccountType accountType) { if (ModelState.IsValid) { _service.Create(accountType); return(RedirectToAction("Index")); } return(View(accountType)); }
public IMessageProvider Create() { var serialNo = SerialNoHelper.Create(); InnerObject.State = AccountTypeStates.Normal; AccountTypeService.Create(InnerObject); AddMessage("success", DisplayName); Logger.LogWithSerialNo(LogTypes.AccountTypeCreate, serialNo, InnerObject.AccountTypeId, DisplayName); CacheService.Refresh(CacheKeys.PointPolicyKey); return(this); }
// POST: api/AccountType public IHttpActionResult Post([FromBody] AccountType model) { _service.Create(model); return(Ok(model)); }