Posts by Raquel Pinheiro • 421 points
14 posts
-
0
votes1
answer134
viewsA: How can I delete a line from a Session?
One Session stores an object, and in its case stores a List. You will not be able to change any list value using Session.Removeat for example, why there you will be removing the object that is in…
-
1
votes1
answer31
viewsA: Is there an alternative to the Outputcache directive previously used on . aspx pages, to be used on . cshtml pages in . net core?
In ASP.NET Core you have two options in this cache strategy that you are looking for. The attribute Responsecache that you can apply only to actions that return data to the View. Thus, all elements…
-
2
votes1
answer257
viewsA: How to take all values of a select and run in a Procedure?
Until a while ago I sent several records to a trial as follows: converting the result of select for XML, the precedent expected as a parameter a VARCHAR(7999) and was used the OPENXML to read the…
-
1
votes1
answer73
viewsA: See External Restapi in Xamarinforms
Data is not being displayed on ListView why you missed placing the hierarchy of the object you want to display, for example: objeto1.objeto2.propriedade. In this case the class Retorno has a list…
-
2
votes1
answer215
viewsA: How to access Ihostingenvironment outside of the Controller in ASP.NET Core?
You create a type variable IHostingEnvironment in class Startup.cs. Then assign the value received in the class constructor. private readonly IHostingEnvironment enviroment; public…
-
2
votes0
answers36
viewsQ: What is the best way to use Firstchanceexception in multithreading application?
I have an application (which is a Windows service) that currently runs N Threads. What I want to do is capture whichever error that occurs in the application to write to a log file '.txt'. Only I…
-
1
votes1
answer24
viewsA: Mapper.Map Addressmodel.Citysmodel Endereco.City
Automapper is unable to convert to Cidade why in class EnderecoViewModel the property is as CidadeViewModel instead of Cidade. public class EnderecoViewModel { public virtual CidadeViewModel Cidade…
-
2
votes1
answer147
viewsA: Subquery with entityframework lambda
See if it works Sum in his select. I created the property TotalVendaPedidos. I did a test here with a list of objects and it worked. .Select(a => new { a.Key.PedidoVendaId, TotalPago = a.Sum(b…
-
0
votes2
answers98
viewsA: Dropdown - ASP.NET MVC
You can use Viewbag to pass a listing from Controller to the View. And to make the relationship between Veiculo and Condutor would have to create a property Condutor in class Veiculo. Would look…
-
3
votes2
answers191
viewsA: COUNT() query does not work
Try to select with join only between tables its_region and its_microRegion to get all the states. The other tables with left join: SELECT ITR.uf, ITR.regionName, COUNT(VAN.kundeid) AS qtdCotacoes…
-
0
votes2
answers48
viewsA: I need to select the last id of a Viewdata
The fourth parameter of the constructor SelectList is the value you want to come selected Docs Microsoft. Try the following: int ultimoId = 0; int.TryParse(_context.Production_Order…
-
1
votes1
answer1013
viewsA: Sqlexception: The INSERT statement conflicted with the FOREIGN KEY constraint
I copied your classes and enabled Migrations. I did the example below and it worked. It only failed when no value is assigned to the property EmpresaId of Funcionario. It worked out this way: public…
-
6
votes1
answer1690
viewsA: Tolistasync() - Sqlnullvalueexception: Data is Null. This method or Property cannot be called on Null values
The error that is occurring from get_Int32 must be why a field int in the table Company is null and in class Empresa no property int is as null. Try to put int? Numero, int? Unidade and so on.…
-
-1
votes1
answer323
viewsA: Aspnet core MVC - CRUD logic in the Controller, Model or Service
Because then, these Visual Studio options of creating the Controller on top of a Model is good for you not having to create the Actions and Views from scratch. However, what happens is that the MVC…