public void InsertOrUpdateProductSold(ProductsSold ps) { if (ps.Id == 0) { ProductsSolds.Add(ps); } SaveChanges(); }
public ProductsSold RefreshEntity(ProductsSold ps) { Entry(ps).State = EntityState.Detached; return(ProductsSolds.Where(psold => psold.Id == ps.Id) .SingleOrDefault()); }
public IQueryable <ProductsSold> FindProductsSold(int unixDate) { return(ProductsSolds.Where(ps => ps.UnixDateStamp >= unixDate) .OrderBy(ps => ps.StoreId)); }