public async Task <IHttpActionResult> DeleteAccount(int id) { DbAnswerCode code = await this._accountRepository.Delete(id); if (code == DbAnswerCode.Ok) { return(Ok()); } return(BadRequest()); }
public async Task <IHttpActionResult> UpdateAccount(AccountUpdateViewModel model) { AccountUpdate update = new AccountUpdate(this._accountRepository.Context); this._accountRepository.Updatable = update.CreateUpdate(model.UpdateType); DbAnswerCode code = await this._accountRepository.Update(model); if (code == DbAnswerCode.Ok) { return(Ok()); } return(BadRequest()); }