Questions tagged as 'c#'

1
answer

How to add an already built view to a controller with asp.net core 2.0

I created a view (Razor Page) in an Asp.Net Core 2.0 project. As I build it from scratch and now I need to assign a controller to it. How do I do this?     
asked by 27.06.2018 / 18:43
3
answers

How can I do "Inner Join"

    
asked by 29.06.2018 / 10:55
1
answer

How to solve this diamond inheritance problem [closed]

Can anyone solve this problem (diamond inheritance) with the use of Interfaces and post here in C #? I found it in this post: why C # does not allow multiple inheritance? but I could not solve it. Inheriting many concrete classes is a major...
asked by 02.07.2018 / 20:18
1
answer

VBA Migration to C # - V10 FilledDataRated

Good morning, I need to migrate the following code: GCPEngine.Comercial.Compras.PreencheDadosRelacionados(ref _documento, (short) _preenche); I find the method FilledDataRated in the DLL ICmpBSCompras, which is an interface and not a cla...
asked by 16.07.2018 / 12:22
2
answers

type 'T' must be a reference type in order to use it as parameter 'TEntity' in the generic type or method

When I try to query using IQueryable , I receive the following error:    Error 3 The type 'T' should be a reference type in order to use it as   parameter 'TEntity' in the generic type or method   'System.Data.Entity.DbContext.Set ()' 1s...
asked by 12.07.2018 / 21:50
1
answer

How do I know if there is content in an object of the class?

I need to know if I have content in a class or if it is empty, how do I get this information? Classe usuario = new Classe(); I wanted to be able to see if there is content in this class of my usuario . In Delphi there is something lik...
asked by 16.07.2018 / 22:16
1
answer

VBA Migration to C # - V10 (KeyPressed)

In VBA in the KeyPress event would be this way. Thanks to v / help for converts to C #. Private Sub EditorVendas_TeclaPressionada(KeyCode As Integer, Shift As Integer) Dim i As Long Dim CaractsArtigoPT As StdBECampos Dim objLinha As GcpBELinha...
asked by 13.07.2018 / 13:23
1
answer

MVC project in C # throwing Exception System.InvalidCastExecption

Dear colleagues, I am trying to learn to develop a project in MVC. But I'm having some difficulties. When executing the program, it executes normally, however when I want to record a product entry note it throws this exception according to the i...
asked by 17.07.2018 / 15:35
2
answers

How to mount a RestRequest with x-www-form-urlencoded in RestSharp C #

I want to make a request using RestSharp when content-type = application/json , I now need to make a request application/x-www-form-urlencoded but I can not find the correct way to do this, here is an example of how I mount the requ...
asked by 26.07.2018 / 18:47
1
answer

Saving fields with a comma

What do I need to do to save a currency value with a comma and send it to the comma. As I stated the price field in the bank: preco number(12,2), Code: class clnPrato { private string _preco; public string preco { get { return...
asked by 15.10.2016 / 21:25