Posts by Thiago Lunardi • 6,968 points
255 posts
-
2
votes2
answers165
viewsA: Can’t find Parameter passed to the Insert command
There are many "opportunities for improvement" in your code. Partial Classe What’s in the ClientDAO? Why did you create a class partial Cliente? What motivation? If you were an abstract, because you…
-
2
votes2
answers1018
viewsA: How to split elements of an array using the For loop?
Their code has a very common feature in academic code. They are thought of to process mathematical states. Try to see how you, as a human, would do this calculation, and then rewrite. Example:…
c#answered Thiago Lunardi 6,968 -
3
votes1
answer337
viewsA: Save bytes to a file
Think about it, there is no miracle. You want to take data from a file and put its contents inside your code. In the end this data is still saved somewhere - in your sources or binaries. So, why…
c#answered Thiago Lunardi 6,968 -
1
votes1
answer203
viewsA: Create a database backup that is on Azure
The Paas Azure SQL Database backups are automated. No additional configuration is required for this. It is held every 5 to 10 minutes. It generates backups complete, differentials and of transaction…
-
1
votes2
answers284
viewsA: How to perform the correct flow deviation in an integration with multiple systems?
Isolation of services by context and then their integrations are topics of much discussion. And of course, every integration strategy depends very much on the scenario and resources available. I…
-
3
votes1
answer845
viewsA: Entity Framework with Oracle
Unfortunately I, even liking the Oracle database very much, advise against using EF Migrations with Oracle. They don’t give proper attention to your preview And there’s always a lot of problems like…
-
3
votes1
answer141
viewsA: Protect Excel spreadsheet in C#
Use Spreadsheetlight. using System; using System.Collections.Generic; using System.Linq; using System.Text; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Spreadsheet; using…
-
2
votes1
answer265
viewsA: Infinite Menu with recursive function
I will post here how to print a menu with recursiveness, and you modify to fit your scenario, ok? Considering: public class MenuItem { public string Text { get; set; } public string Link { get; set;…
-
16
votes3
answers2510
viewsA: When not to return Task in async methods?
Every method async should rather return a Task - whether or not to wait for its end. A method async - beyond the obviousness of being an asynchronous method - it means that a new Thread to perform…
-
2
votes2
answers907
viewsA: What is HTTP Response splitting?
One cannot have two Sponses for a request. The name comes from the possibility of returning two contents in the same Answer - one false and the other true, but this second will be ignored. Using the…
-
4
votes1
answer438
viewsA: C# Calling an object from a string
You can use it Collections for that reason. public class ButaoCollection : List<Butao> { public Butao this[string name] { get { return this.SingleOrDefault(butao => butao.Name == name); } }…
-
2
votes1
answer56
viewsA: Collect data from View to the controller
There’s a lot of weird stuff in the code that showed. A View typed must be the type of an entity of yours. In your example, it should be of the type Porto. @model `Porto` <label>Nome do…
-
2
votes1
answer184
viewsA: EF Core Complex Object Insertion with Webapi
Entityframework is trying to add a new Pais, and as it is not explicit that it is the EF that should create the Ids, the EF is waiting for the Country Id to be null or 0, thus passing the…
-
0
votes2
answers330
viewsA: Difference between Find, Exists and Contains of the List<T> class
Explaining the same with other words. Find: Find an element that matches the settings, and returns the first value of the list. NAY. It returns all elements - not just the first, it returns a list -…
-
6
votes1
answer105
viewsA: How to use Application Insights in more than one application?
Application Insights can be used in more than one application? YES! There is no restriction on that. It’s even common to use a single service for backend metrics - API - and clients - WEB, Mobile,…
-
8
votes1
answer734
viewsA: MVC - Creating a typed model as a generic list
Use Interfaces Check it out, your View expects to receive a list of objects where they necessarily have the property Name: @foreach (var item in Model) { <h1>@item.name</h2> } So we…
-
1
votes1
answer92
viewsA: Is it a good choice to start a project with Diagram use cases, then class diagram?
That answer is based entirely on my opinion. Diagrams is a management mode/specification/documentation old school. Search to document your requests via User Stories. Are simpler to create, and after…
-
5
votes1
answer143
viewsA: Doubt with SQL Injection
YES! Using string concatenation is the main way to create opportunity over a SQL Injection. No matter if by explicit concatenation - "a" + "b" - with extensions - string.Format("{0}", "a") - or by…
-
0
votes1
answer358
viewsA: Edit Excel spreadsheet with C# in Microsoft Azure
Just to summarize: Azure App Services Webapp is a Platform as a Service. This means that the full responsibility for maintaining the infrastructure lies with Microsoft and not with the developer.…
-
4
votes2
answers6460
viewsA: What is the difference between a programmer and a software engineer?
You must have graduated to be considered a software engineer? Well, to hold the title of Engineer, yes, it is necessary. But knowledge is free, if you study and master enough computation and…
-
1
votes1
answer318
viewsA: How to free access to Mysql in-app on Azure?
NAY. There is no way you can directly access a Mysql In App. This is a service to create prototypes, offering you a simple and cheap hosting service - as it does not charge surpluses by the bank.…
windows-azureanswered Thiago Lunardi 6,968 -
1
votes3
answers725
viewsA: ASP.NET MVC Web - How to separate performance between the modules of a project?
I endorse the answers of the Gypsy, but in the question below , I am of another opinion. But it doesn’t mean it’s my answer or his is right or wrong or worse or better. Anyway, at once my project…
-
12
votes3
answers1101
viewsA: What is the difference between architecture, engineering, science, analysis, design, programming and coding?
Architecture In the civilian field, it’s design and build the human-inhabited environment, seeking expectations such as comfort, use of space, use of light, air circulation, etc. In the software…
-
0
votes1
answer142
viewsA: Discussion about software architecture
Legal its maturity to see conflicts of responsibilities between projects/ software. I hope I can use this distrust of yours to recommend you an architectural proposal. Identification and separation…
-
3
votes1
answer2791
viewsA: CLOB for string and vice versa
Read CLOB is not in the same way as in other columns, because this does not have a "primitive" type - char, int, datetime, etc. First understand the following: CLOB is not a table column. In the…
-
0
votes1
answer505
viewsA: Architecture API Restful
The API must support 100 requests per second. Let’s separate the responsibilities here. The responsibility of the developer is to create a performative API, which supports simultaneous and clustered…
-
1
votes2
answers108
viewsA: Is there a Pattern design that can help with this problem?
Feature Flags That’s the name of Pattern what search. You can read more about this in that other Stackoverflow response, or on Wikipedia about Feature Toggle. One Feature Flag (or Feature Toggle) is…
-
0
votes1
answer38
viewsA: Site does not connect to database after published
You must configure your database to be accessed from App Services - in your case, a Webapp. Access your database’s firewall rules. From access permission by Azure Services. I believe that this…
windows-azureanswered Thiago Lunardi 6,968 -
2
votes3
answers614
viewsA: How to create a custom list using data from four tables?
Simpler to update your Nota class Nota { int id; Fornecedor Fornecedor; Produto Produto; Classe Classe; } So just use: var nota = GetNotaPorId(idNota); var fornecedor = nota.Fornecedor.Descricao;…
-
1
votes1
answer68
viewsA: Desktop C# Mobile Comparison
Yes, there is a lot of difference in the way you develop, but not in the language. The C# language is exactly the same on any platform. Syntax and language options you will have on any platform you…
-
1
votes1
answer30
viewsA: Azure backend with C#. Create a new field in a table
Depends on your deployment strategy. Manual updating, such as using Visual Studio, or SQL Management, is entirely possible. However, the ideal is to always try to create automations for this,…
-
1
votes1
answer47
viewsA: How to implement w3c bandwidth requests?
There are two basic ways to stream video via the web: Pseudo Streaming: It takes this name because, in fact, it does not stream, it downloads all the binary of the video, progressively, and plays…
-
1
votes1
answer90
viewsA: Google Consent screen does not open
It is very likely that the problem is this file access using FileDataStore. Certainly, in Azure, you will not have access to this path. Especially if you are using Azure App Service. There are…
-
0
votes1
answer428
viewsA: Consuming web api with various models
According to the link response code: public IQueryable GetVerb() { var dados = from d in db.Tabela1 join a in db.Tabela2 on d.Tabela1_Tabela2Id equals a.Tabela2Id select new { nome = d.Nome, cnpj =…
-
1
votes2
answers928
viewsA: Close entityManager after operations? How to manage?
Assuming it is a web application, follow my considerations: A context per request: With each request made to your application, create only a repository context. In your case, open the connection…
-
2
votes1
answer88
viewsA: Mongodb integration with ASP.NET MVC 5 and Postgresql
It is worth using this type of architecture with Postgresql and Mongodb in the same project? If your project really works with relational and non-relational data, it is well worth it. And…
-
1
votes3
answers8500
viewsA: Angular + ASP.NET MVC: Does it make sense?
It makes sense that I have a Controller in aspnet mvc to display only a view? Yes, you can use both, but in my vision, No, it doesn’t make any sense use MVC with SPA app - be angular, React,…
-
1
votes2
answers272
viewsA: Sql auction script
In a single query you do not solve this. Working with auction bids are more complex than they appear to be - I work in a auction house. ;) You’ll have to run a series of rules and filters to get to…
-
-1
votes2
answers67
viewsA: Cache Redis on Azure
I imagine you’re not getting the downscaling because, after charging 90K Keys, only a few plans support stocking all this data. I don’t know the size of your data mass, but, for example, the C0…
windows-azureanswered Thiago Lunardi 6,968 -
6
votes2
answers225
viewsA: What is Fastexpando/Fastexpandoobject?
Expandoobject are dynamic objects, i.e., objects that Voce can add or remove properties at runtime. dynamic meuCache; meuCache.QualquerCoisa = "Qualquer coisa mesmo"; meuCache.OutraCoisa = new {…
-
0
votes1
answer35
viewsA: Fill bank by expanding a given value on so many items
There are several points to consider, follow the refactored code: // tenha nomes de variaveis/parametros o mais claro possivel private void CriarSalas(int idPredio, int quantidade) { try { // Cria a…
-
8
votes1
answer1551
viewsA: There is no Viewdata item of type 'Ienumerable' that has the key 'Categories'
Every time you give a Re-turn, you must repopulate your Viewbag again. So if you have this endpoint to open the form of "New Product": [HttpGet] public ActionResult NovoProduto() {…
-
1
votes1
answer929
viewsA: How to configure subdomain in microsoft Azure
To do this is very simple, just, on your DNS, create an entry CNAME by name blog pointing to beleza.vc/blog. If using the Azure DNS - because you can register your domain in Namecheap and use the…
-
2
votes1
answer47
viewsA: Doubt in consultation with Entityframework
Assuming that your table t0100_historico is represented by the entity Historico, then your lambda expression will look something like this: db.DbSet<Historico>() .GroupBy(new { p.Id, p.Lote })…
-
4
votes1
answer60
viewsA: Simple query Mysql
With the following query, you are returning all clients already related to all categories: SELECT cli.*, cat.* FROM cliente cli JOIN categoria_cliente cc ON cc.categoria_cliente_cliente_id =…
mysqlanswered Thiago Lunardi 6,968 -
4
votes1
answer416
viewsA: How to insert arrays inside angular objects?
For example, simply remove the brackets: $scope.postVeiculo = function () { var v = { Marca: $scope.veiculo.Marca, Modelo: $scope.veiculo.Modelo, Versao: $scope.veiculo.Versao, .... Files:…
-
3
votes4
answers7214
viewsA: Difference between epics and Features
Epic, Features and User Stories are SCRUM artifacts, not VSTS definitions. These artifacts help you break the values of your deliveries into blocks of expectations. In a very simple example, a…
-
1
votes1
answer62
viewsA: Azure SQL database refusing connection
Your string Connection really is very confusing. Take a look at it if you don’t have too much information. The standard of Connection string for Azure SQL is…
-
0
votes1
answer46
viewsA: Scheduler for Azure
It is a good option to run complex programs in scheduling (web job) or better the classic VM? Yes, It is a good option to use Paas - Platform as a Service - to run complex programs. Especially if…
-
0
votes1
answer606
viewsA: Function search text
Only HTML does not. HTML only renders components in the browser. If you agree to use at least Javascript, that question in the O.R. English do what you need. Jquery search in Static HTML page with…