Questions tagged as 'c#'

1
answer

Storing Variables of type List in a SQL Server Database

Good Night Personal, I'm developing an application that makes a relationship between a Player and one or more games (online games), the problem is that a game can have a one more different skills, I wonder if you have a way to leave the new d...
asked by 09.05.2018 / 03:42
1
answer

Web API does not accept parameters in constructor with Autofac

I've created an API to query client, this is my configuration: public static class AutofacWebapiConfig { public static IContainer Container; public static void Initialize(HttpConfiguration config) { Initialize(config, Regi...
asked by 23.03.2018 / 15:17
1
answer

POST in Web API returns Invalid Content Type

I'm trying to send a POST request to a Web API. If I do it by Postman, it works: NowwhenItrytoexecutethroughcode,Igetthefollowingerror:{"status": false, "message": "Content Type Inválido. (Formato aceito: Content Type = \"application/...
asked by 23.03.2018 / 18:41
1
answer

How to minify CSS / Javascript automatically in ASP.NET MVC5

I use Visual Studio 2017, my application runs in ASP.NET MVC5 (Razor), is there a way to minify all the files I choose at the time of "publish"?     
asked by 22.03.2018 / 14:32
1
answer

Concatenate arrays accumulating content in C #

Gentlemen, the question is of the C # programming language, my question is: how can I put all the items in array B within each item in array A and the result of that will be stored in array C. Thanks. Thank you in advance ... public void Te...
asked by 07.04.2018 / 16:05
1
answer

Error Entity Framework Core

I have an error with Entity Framework core when I add Migration, the following error appears to me: System.InvalidOperationException: Cannot use table 'Atleta' for entity type 'Pessoa' since it is being used for entity type 'Atleta' and th...
asked by 08.03.2018 / 17:16
1
answer

Make the console take a value from another class in C #

I'm trying to learn C # language. In this case I'm trying to make the Console show the value of the balance, taking this value from a different class in the same file (already tried with multi-files and still does not work, the compiler does not...
asked by 08.03.2018 / 18:23
1
answer

Bidirectional Communication - Send and Receive string value correctly

Follow the server code: int port = 11000/*PortGranter.GrantPort()*/; TcpSocketListener listener = new TcpSocketListener(); var tcs = new TaskCompletionSource<ITcpSocketClient>(); await listener.StartListeningAsync(port); listener.Conn...
asked by 16.03.2018 / 15:48
2
answers

Lambda Expression X linq

Speaking in terms of performance in the whole (speed, integrity and etc ...), use lambda expressions to query database, is it better in terms above or not or depends?     
asked by 05.06.2014 / 22:06
1
answer

Physical and Legal Person on the same table

Could you help me please? I am developing a client crud, where I will leave legal and physical person in the same table, but in the case when the user chooses the type of person through a radio button, I will show and hide some fields through...
asked by 18.09.2018 / 19:34