Skip to content

Instantly share code, notes, and snippets.

View kfimchenko's full-sized avatar

Kirill Fimchenko kfimchenko

View GitHub Profile
public void UpdateProduct()
{
var productToUpdate = _context.FollowProducts
.FirstOrDefault(fp => fp.LastUpdate < DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Unspecified));
if (productToUpdate == null)
return;
var updatedProduct = _shops.GetProduct(productToUpdate.ShopType, productToUpdate.URL);
if (updatedProduct.Price < productToUpdate.Money)