Posts by Walter Junior • 61 points
8 posts
-
0
votes1
answer148
viewsA: Convert Query SQL Server to Entity Framework
That would be the query: var res = (from x in Contexto.Set<ReportePedido>() where x.PedidoId == 145 orderby x.EnderecoEstoque.Substring(0, x.EnderecoEstoque.IndexOf('-')) select x);…
-
1
votes2
answers57
viewsA: How to add AND parameters in EF query
You can use Predicatebuilder 1 - Create the following class: public static class PredicateBuilder { public static Expression<Func<T, bool>> True<T>() { return f => true; }…
-
1
votes1
answer427
viewsA: Search CLASS element with value in space
Use as follows: findElement(By.xpath("//div[@class='slds-form-element slds-form-element_readonly']")); Or: findElement(By.cssSelector("div[class='slds-form-element slds-form-element_readonly']"));…
-
0
votes1
answer49
viewsA: Update only a property of an object using Outputcache in Actionresult
Rafaela, as this property is inside the answer, all content will be in the cache. Try to change this part of your code: [OutputCache(Duration = 3600, VaryByCustom ="none")] To: [OutputCache(Duration…
-
0
votes1
answer92
viewsA: Viewbag Life Cycle in C# MVC
One ViewBag transfers data from controller to view, ideally temporary data that is not included in a model. The life of a ViewBag lasts only during the current http request. The values of a ViewBag…
-
1
votes2
answers932
viewsA: How to pass a large list of objects to API in C#?
Try sending it that way: public JsonResult PdfSellout(List<SellOut> sellout) { var lista = buscarLista(); var jsonResult = Json(lista, JsonRequestBehavior.AllowGet); jsonResult.MaxJsonLength =…
-
0
votes2
answers256
viewsA: Show "Loading..." while browsing between pages
In my case, I use blockUI as follows: $(document).ready(function () { //blockUI default $.blockUI.defaults.message = '<img src="@Url.Content("~/Content/img/ajax_loader.gif")" />';…
-
0
votes2
answers146
viewsA: Error writing new record in Access database
I advise you not to use it this way... You are concatenating the values within the query. Try to impute the values using parameters. This will avoid problems that may come to be code injection and…