public async Task <LicenseDto> GetLicense() { var x = new LicenseDto(); x.License = await LicenseContext.GetLicense(); return(x); }
public async Task <LicenseDto> GetLicense([FromBody] LicenseDto data) { var license = data.License; if (await LicenseContext.CheckIfValid(license)) { await LicenseContext.SaveLicense(license); return(await GetLicense()); } throw new WebApiException("InvalidLicense", ExceptionSeverity.Error); }