Questions tagged as 'c#'

1
answer

SQLite Visual Studio 2008

I'm trying to work with SQLite in Visual Studio 2008 to make a system for Windows Embedded Compact 7. The problem is that it always gives the following error: A first chance exception of type 'System.MissingMethodException' occurred in System...
asked by 22.01.2018 / 20:10
2
answers

VS 2015 SOAP does not work, but in SOAPUi it works normal

At the company there is a Service provided through WebService SOAP (IBM BPM) . I can not reply to VS 2015 using the Web Reference a connection to this service. I always get the answer after a long time; The timeout of the operation has been...
asked by 22.01.2018 / 20:31
1
answer

limit users in the database

I searched and did not find out how to do to limit users in a DB ... I'm trying to make a C # application using 'sql server' and would like to know how to make userDB have a maximum of 5 users, when trying for the 6th user the system warns that...
asked by 22.01.2018 / 19:45
1
answer

fluent api - Map table to another table with same key

I need to know how to map in the fluent API the following item public class ImportacaoHeader { public string IdImportacao { get; set; } public DateTime dataInicio { get; set; } } public class ImportacaoLog { public string IdImpor...
asked by 23.01.2018 / 14:39
1
answer

Format line with itextsharp

How can I build a line with different formatting in itextsharp? I tried this way: Paragraph paragrafo = new Paragraph(Texto, new Font(Font.FontFamily.COURIER, tamanho, estilo)); doc.Add(paragrafo); But with each "add" it plays on a new l...
asked by 19.01.2018 / 14:20
0
answers

Error Request Mail

Can anyone give me a help here? I'm doing an environment check to be able to send a certain email, but it's giving the following error. Couldyoutellmehowtosolvethis?mycodeisbelowpublicvoidNovoEventoAdverso(intpatientId,inthospitalId,intusuar...
asked by 19.01.2018 / 15:58
1
answer

Can not serialize member * because it is an interface

Personally I ran into the above error when trying to create a webservice and I'm having difficulty interpreting and treating it. Detailing what I did: Within a InpartSaude.WebApi.Api project in one of my controllers I...
asked by 24.01.2018 / 20:50
1
answer

Entity Framework creation of bank

I'm new to entity and I'm following a step-by-step guide to creating a Code First ( link ) . I created the application, debugged it and it runs perfectly without any errors, however no bank is created ... The main code follows the App.config...
asked by 19.01.2018 / 01:01
0
answers

How to retrieve UserId in ASP.NET Core Identity - in a class library

I'm using ASP.NET Core 2.0 and Microsoft.AspNetCore.Identity 2.0.1 In a class, actually in context, I need to retrieve the logged-in user ID. in the old one, I would: var userId = User.Identity.GetUserId(); Now in ASP.NET CORE, if I...
asked by 26.01.2018 / 17:19
0
answers

Problem in validating the Data.Annotations

I'm creating a login screen in ASP.NET.Core MVC, and I'm using validations via Data.Annotations , however they are not being applied correctly on the screen. Following codes: View: @model PCI.EV.Models.Clientes <script src='http...
asked by 18.01.2018 / 17:54