Questions tagged as 'c#'

0
answers

return json c # .net core sql

I am testing with a console application . In it I query the database and would like to return a json file from the result. Is it possible to return the query json without instantiating the object? how can I do this? I tried converti...
asked by 16.02.2018 / 20:19
2
answers

System.IO.IOException: The user name or password is incorrect

I have an ASP.NET application, which is an ASP.NET application, where I need to access a directory and check files and sometimes move and delete them. In my micro it worked perfectly, however when uploading the application on the IIS server it s...
asked by 28.02.2018 / 19:28
0
answers

Mock with MediatR and xUnit

I have a project that I am implementing the Unit Tests with the Mock Framework, in this project I have implemented CQRS using MediatR. Follow the test code public RegistrarMaanaimComandTest() { [Fact] public void RegistrarLocal_Reto...
asked by 22.02.2018 / 12:27
0
answers

nhibernate oracleBulkCopy c #

According to the attached image, I have an attribute class accompanied by the ListarMunicipio method, where it has a list, in the method then I have public static void InserirOuAtualizar(Municipio municipio) , I'm working with the...
asked by 22.02.2018 / 13:49
1
answer

How to use enum with EntityFramework [duplicate]

I have a relationship of my system where one class makes a relationship with another, but this other class there is nowhere in the system to change / delete its state (they are just static data) p> I would like to know if the ideal would b...
asked by 21.02.2018 / 17:49
0
answers

System.Data.SqlClient.SqlException Conversion failed when converting date and / or time from character string

Live Personal, I'm new to the .NET world, C #, EntityFramework (Microsoft world). I am working on a project with the mentioned technologies, initially I was programming in a VM (with Windows) because I use MAC but I had some performance probl...
asked by 21.02.2018 / 16:13
0
answers

Entity Code First Migrations can not find Microsoft.EntityFrameworkCore.Design

Hello, I'm working on a dotnet 4.5.1 project using EntityFramework with CodeFirst Migrations, I've added 1 new field to an entity and I'm trying to add a new migration, however the following error message appears: N�o foi poss�vel carregar arqu...
asked by 14.02.2018 / 13:49
1
answer

Validate fraud attempt while editing registry with C # MVC

In my applications I was leaving the entity ID inside HTML being a hidden object. Example: @Html.HiddenFor(m => m.EntidadeID) But, I have identified that I can edit the HTML easily and in POST I can receive an invalid value. Before...
asked by 14.02.2018 / 17:51
1
answer

database backup

I looked at some tutorials here on the site, but I did not find one that fits with what I'm looking for, so I followed this tutorial Backup & Restore Sql Server database in C # It even has a link in the comments with the codes already r...
asked by 13.02.2018 / 03:51
0
answers

Associate an entity with IdentityUser

Gentlemen, I have a category class, which must be entered by registered users. My relationship idea is 1 user can have multiple categories. I have my projects separated but related to each other according to the image below I tried t...
asked by 13.02.2018 / 18:56