public void Initialise() { _validator = ModelValidatorInstantiator.GetValidatorFromModelAttribute <MyAccountsDetailDto>(); // Contains sufficient setup for a model to be valid // Tests will change this to be invalid and create error states _model = new MyAccountsDetailDto(); }
public async Task <IActionResult> GetMyAccountsDetail([FromBody] MyAccountsDetailDto model) { // TODO: review versus proxy behavaviour and other controllers if (!ModelState.IsValid) { return(new BadRequestResult()); } var result = await _myAccountsService.GetMyAccountsDetail(model.UserId, model.LowellReference); return(Ok(result)); }