Foreground events

Foreground events are state change events that occur when the user interacts with any graphical user interface, such as in a website or mobile app. These events require direct user interactions with applications. The following code is related to state changes when we add a new product to the product catalog list for an e-commerce website.

From the following code, we can verify that whenever there is a product catalog modification request that comes through the HTTP PUT operation in a website, there is a foreground event that is emitted through an entity state change modification. Capturing and routing those events will help an enterprise to synchronize multiple connecting systems that are interested in a product catalog entity:

 [HttpPut("(id)")]
public async Task<IActionResult> PutProductCatalogueItem(long id, ProductCatalogue Item)
{
if (id != Item.Id)
{
return BadRequest();
}
_context.Entry(Item).State = EntityState.Modified;
await _context.SaveChangesAsync();

return NoContent();
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.145.223