Posts by Eduardo Moreira • 383 points
16 posts
-
0
votes2
answers95
viewsA: Read contents of ZIP file without writing to disk
Look, I’m sorry I even opened that question. Working a little bit more on my code I managed to use Memorystream, yes. Before I thought it was not possible. I tried to delete the question and I did…
-
-1
votes2
answers95
viewsQ: Read contents of ZIP file without writing to disk
In the program I am writing I download a ZIP file over the internet and then need to upload the files extracted from ZIP to another place. Turns out I can’t find a way to read the contents of that…
-
0
votes0
answers43
viewsQ: How to get application settings in static classes in Aspnet Core 1.1
In my application’s web project I have the appsettings.json: { "Foo": "Exemplo" }, And I have a class that reflects that configuration: public class FooSettings { public string Foo { get; set; } }…
-
2
votes1
answer100
viewsQ: Asp.net MVC does not recognize dates in dd/mm/yyyy received via GET
I am making a filter for a paged list. The values of this filter should be sent via ajax with Verb GET. This is the model: public class FiltroViewModel { public DateTime? CriadosDe { get;set; }…
-
1
votes2
answers41
viewsA: Action that returns Partialview is not being called
The way you are using the . load() method will be done via GET. To be done via POST you must pass the parameter as an object. It looks like this:…
-
3
votes3
answers151
viewsQ: How to create extension methods in the Entity Framework using Linq?
You can create custom extension methods for Linq to entities? In the project I work, for example, we have several columns of type DateTimeOffset?. In certain views I need to filter the results by…
-
1
votes1
answer964
viewsA: Slow loading with Jquery Datatables plugin
I have already experienced this problem. I realized that slowness was caused by manually filling the table and then using $('#table'). Datatable(). I see two alternatives to solve this, but both…
-
2
votes1
answer160
viewsA: Return with multiple json with jquery . net
controller: var result = new { cidade, bairro, estado, pais }; return Json (result, JsonRequestBehavior.AllowGet); "result" is a anonymous object javascript: <script>…
-
2
votes1
answer209
viewsA: Entityframework 6: Doubt to Persist a Relationship N to N
First, in your classes you should use Icollection in navigation properties. With Ienumerable you will not be able to modify. In mapping: public class AgendaMap :…
-
3
votes2
answers353
viewsA: Entity Framework search as case sensitive
I didn’t understand your code, but you can solve your problem using the methods String.Toupper or String.Tolower for example: var result = colecao.Where(c =>…
-
1
votes1
answer95
viewsA: Popular table with api Fluent
The Tbmenuperfil table is an auxiliary table. The Entity Framework handles it internally. You will only manipulate your models, as always. But you need to catch the object after it has been added to…
asp.net-mvcanswered Eduardo Moreira 383 -
1
votes2
answers585
viewsA: How to change Checkbox with Dropdownlist onChange in ASP.NET MVC Table?
I think this column of your table is redundant. Your question was not very clear, but I read in one of your comments that you cannot update the checkbox column in the database. This is because your…
-
2
votes2
answers1616
viewsA: How to Send Controller Checkbox?
I usually do something like this: public class ClienteViewModel { public ICollection<ClienteASelecionar> Clientes { get;set; } } public class ClienteASelecionar { public bool Selecionado {…
-
2
votes2
answers808
viewsA: Search Filter
If I understand the question correctly, you can do something like this: var result = Db.TabCadStatusOrdemServicoItem.ToList(); //Para cada campo do filtro, adicionar um bloco If igual ao abaixo if…
-
0
votes2
answers266
viewsA: Create tooltips using Attributes
I ended up going another way. I realized that I could put the tooltip in a span tag instead of in the element itself. Stayed like this: public static MvcToolTip ToolTipFor<TModel, TValue>…
-
1
votes2
answers266
viewsQ: Create tooltips using Attributes
I created a custom attribute called Tooltip. I would like to add tooltips to any property that has this attribute. Example: In my model I have the following property: [Required, ToolTip("Neste campo…