Posts by Claudinei Ferreira • 304 points
20 posts
-
1
votes1
answer50
viewsA: .Orderby() Does not order correctly - Aspnet Core
After researching I made some changes and Orderby() worked. The previous Code: ViewBag.Bairros = _context.Imoveis.Select(c => new SelectListItem() { Text = c.Bairro, Value = c.Bairro }).OrderBy(x…
-
-3
votes1
answer50
viewsQ: .Orderby() Does not order correctly - Aspnet Core
In an Aspnet Core 2.2 application, I had the following code that selected the field of a table and instructed to sort by Text: Controller: //Bairros ViewBag.Bairros = _context.Imoveis.Select(c =>…
-
1
votes1
answer233
viewsA: Query user in Sql server
For you to have access to SQL SERVER set the connection in appsettings.json "ConnectionStrings": { "DefaultConnection":…
-
0
votes3
answers10666
viewsA: Error in publishing application to OSI
All you sometimes need is to know the correct way to set up IIS to receive ASPNET Core. According to the documentation, in addition to Runtime, you need to configure IIS…
-
1
votes0
answers60
viewsQ: Good Practices and Use of Datetime in Viewmodels List
I’m making a system for the client, and he dismissed the use of fullcalendar, which would be practical. With this, I created in a table with the fields Agendaid(int), and Scheduling(Datetime) years…
-
1
votes2
answers153
viewsA: C# convert dynamic string to xml with TAG
There are several ways to do what you want, I have a project that handles xml strings directly, but in your case, you can use Xmldocument to do the required conversion. XmlDocument xmlDoc = new…
-
0
votes1
answer39
viewsQ: How to get the first foreign table row with Entity framework core?
I have a table of real estate and real estate photos, with the respective models: Real estate [Key] public int ImovelId { get; set; } public int? CategoriaId { get; set; } public string Endereco {…
-
2
votes1
answer277
viewsQ: Check if cookies exist in ASPNET CORE
I’m migrating from the Asp.net Webforms to the Core 2.2 and in the application, we stored information such as Id, and other parameters. In Asp.Net Core I use Seguinte Iactionresult to record the…
-
0
votes2
answers1395
viewsQ: How to pick up items from a json in c#
After almost 3 days trying to implement I did not succeed. I have the following json: { "code": 200, "data": [ { "id": 1, "type": "charge", "custom_id": "1208", "status": { "current": "new",…
-
0
votes1
answer75
viewsQ: Generate list dynamically with Linq
I have an API that uses Dotnet’s Dynamic to generate billets. The documentation is as follows: dynamic endpoints = new Endpoints("client_id", "client_secret", true); var body = new { items = new[] {…
-
2
votes1
answer85
viewsA: Help with Querie in Linq C#
With the help of @Lucas Miranda I was able to implement the following: var msg = from p in db.Chats orderby p.ChatId descending group p by new { p.ContaId, p.InteressadoId } into g select new {…
-
1
votes1
answer85
viewsQ: Help with Querie in Linq C#
I have a message table in the following scheme: Id | osID |Interessado | Remetente | Destinatario | Msg -------------------------------------------------- 1 | 2 |João | João | Maria |bla bla bla...…
-
-2
votes4
answers1299
viewsA: Disable the forms autocomplete
According to the W3school, this is standard behavior, and it should be working. <form action="/action_page.php" autocomplete="on"> <!-- este está habilitado --> First name:<input…
-
2
votes0
answers31
viewsQ: Autocomplete comJQuery querie Estruturada
I needed to do a query that worked as the following example: In the print you can see that by typing an item, returns structured by neighborhood and then city. I wanted to know how to do my query…
-
0
votes2
answers100
viewsA: User by Company - Asp.net Identity
As for the model, it’s okay now, but what if you need changes, like, now a user controls two branches!? You might have problems with that. What you can do is keep the Aspnetusers table as is and…
asp.net-identityanswered Claudinei Ferreira 304 -
2
votes1
answer721
viewsQ: How to join two tables using auxiliary table and LINQ
I have the tables People and Representatives, where in my application the person may or may not have representative(s). public class Conta { int PessoaID; string Nome; String Documento; } public…
-
0
votes2
answers385
viewsA: How to call a form from another project in Webforms?
The best way to do this is Response.Writefile(); Response.Write("Please Login: <br>"); Response.WriteFile("login.txt"); Just as a file can be a URL. See more in…
-
2
votes2
answers82
viewsQ: Filling Label with Linq using Tolist()?
I have a table with the following schematics: GarantiaImovel | imovelID | GarantiasTipos 12 | 3 | Caução2 12 | 4 | Depósito 12 | 5 | Caução2 12 | 5 | Fiador 12 | 5 | Seguro Fiança So I have the…
-
0
votes3
answers4152
viewsA: Create Dropdown Menu
Hello, Bootstrap came to make life easier with css. it standardizes the whole css structure and has on that website has a documentation with everything almost ready! :) Simply associate one of the…
-
3
votes0
answers63
viewsQ: doubt Linq to Sql conditions
I have a Gridview with certain products and a dropdown of quantity for each. At an event onClick, products with quantity > 0. The problem is when I have a "detailed" table, and I invoke it with…