Minor refactoring for the CreateOrder Web API method and the Entity base class

This commit is contained in:
Cesar De la Torre 2017-05-04 12:29:00 -07:00
parent e5217c1756
commit e31ee0dcd8
2 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers
commandResult = await _mediator.SendAsync(command);
}
return commandResult ? (StatusCodeResult)Ok() : (StatusCodeResult)BadRequest();
return commandResult ? (IActionResult)Ok() : (IActionResult)BadRequest();
}

View File

@ -50,6 +50,9 @@
if (Object.ReferenceEquals(this, obj))
return true;
if (this.GetType() != obj.GetType())
return false;
Entity item = (Entity)obj;
if (item.IsTransient() || this.IsTransient())