public void Create(AccountCreateCommandModel model) { var item = AccountBusinessLogic.MapForCreate(model); this.AccountDataService.Add(item); this.AccountDataService.SaveChanges(); }
public static Account MapForCreate(AccountCreateCommandModel source) { var target = new Account() { Name = source.Name, Bank = source.Bank, Amount = source.Amount }; return(target); }
public IHttpActionResult Create(AccountCreateCommandModel account) { if (account == null) { return(NotFound()); } else { _accountBusinessLogic.Create(account); return(Ok()); } }