protected override void FillUpdateParams(CustomSqlCommand in_sp) { base.FillUpdateParams(in_sp); _modified = DateTime.Now; in_sp.AddParameter("@in_modified", UnixEpoch.FromDateTime(_modified)); in_sp.AddParameter("@in_matrixId", _matrixId); in_sp.AddParameter("@in_priceOfPurchase", _priceOfPurchase); in_sp.AddParameter("@in_priceOfSell", _priceOfSell); }
protected override void FillUpdateParams(CustomSqlCommand in_sp) { base.FillUpdateParams(in_sp); _modified = DateTime.Now; in_sp.AddParameter("@in_modified", UnixEpoch.FromDateTime(_modified)); in_sp.AddParameter("@in_articleId", _parent.Article.Id); in_sp.AddParameter("@in_pointOfSaleId", _parent.PointOfSale.Id); in_sp.AddParameter("@in_x", _x); in_sp.AddParameter("@in_y", _y); in_sp.AddParameter("@in_amount", _amount); }
public void Test1() { var command = new CustomSqlCommand("DBContext"); var testInt = 5; var plane = new Plane { PlaneAge = 10 }; var query = command.Select(typeof(Plane), typeof(Tickets)) .From(typeof(Plane)) .Join <Plane, Tickets>((x, y) => (plane.PlaneAge + testInt) < y.Price).ToString(); }
public void Test2() { var command = new CustomSqlCommand("DBContext"); var list = new List <int> { 8, 9, 10 }; command.Select(typeof(Plane)) .From(typeof(Plane)) .Where <Plane>(x => x.PlaneAge == list.Count()).ToString(); }
public void SimpleQueryTest() { var command = new CustomSqlCommand("DBContext"); var query = command.Select(typeof(Plane), typeof(Tickets)) .From(typeof(Plane)) .Join <Plane, Tickets>((x, y) => x.Id == y.PlaneId) .Where <Plane>(x => x.Id == 2); var stringQuery = query.ToString(); var passengers = query.ExecuteCommand <AirCompany>().ToList().Count(); }
protected override void FillUpdateParams(CustomSqlCommand in_sp) { const string c_timeCancelledParam = "@in_timeCancelled"; base.FillUpdateParams(in_sp); in_sp.AddParameter("@in_type", (long)_type); if (_timeCancelled.HasValue) { in_sp.AddParameter(c_timeCancelledParam, UnixEpoch.FromDateTime(_timeCancelled.Value)); } else { in_sp.AddParameter(c_timeCancelledParam, (long?)null); } }
protected override void FillUpdateParams(CustomSqlCommand in_sp) { base.FillUpdateParams(in_sp); Id = _doc.Id; in_sp.AddParameter("@in_docId", Id); in_sp.AddParameter("@in_timeSold", UnixEpoch.FromDateTime(_timeSold)); in_sp.AddParameter("@in_articleId", _articleId); in_sp.AddParameter("@in_articleName", _articleName); in_sp.AddParameter("@in_articlePriceOfPurchase", _articlePriceOfPurchase); in_sp.AddParameter("@in_articlePriceOfSell", _articlePriceOfSell); in_sp.AddParameter("@in_pointOfSaleId", _pointOfSaleId); in_sp.AddParameter("@in_pointOfSaleName", _pointOfSaleName); in_sp.AddParameter("@in_unitPrice", _unitPrice); in_sp.AddParameter("@in_unitCount", _unitCount); in_sp.AddParameter("@in_cellX", _cellX); in_sp.AddParameter("@in_cellY", _cellY); in_sp.AddParameter("@in_paymentByCard", _paymentByCard ? 1 : 0); }
public void Test3() { var command = new CustomSqlCommand("DBContext"); command.Join <Plane, Tickets>((x, y) => x.PlaneAge < Convert.ToInt32("5")).ToString(); }
protected override void FillUpdateParams(CustomSqlCommand in_sp) { base.FillUpdateParams(in_sp); in_sp.AddParameter("@in_cellsX", CellsXAsString); in_sp.AddParameter("@in_cellsY", CellsYAsString); }