Questions tagged as 'c#'

1
answer

System.ArgumentException when using MySQL with Entity framework

I installed the MySQL connector in the environment, I installed the MySQL references through the Nuget package. When I start the system and try to insert into the database, the following error appears:    The ADO.NET provider with invariant n...
asked by 02.09.2014 / 23:27
1
answer

Convert string into XML

Consider the table: In code behind, I can not convert a string to an xml modCamadaOperacao objModCamada = new modCamadaOperacao(); objModCamada.idCamadaOperacao = idCamada; objModCamada.xmlCamadaOperacao = serializer.Xml; // XM...
asked by 17.09.2018 / 22:48
2
answers

Fields Currency 1,99 saving as 199 in Access

I'm having a problem when I'm going to save the data from currency or decimal fields to an Access database using the Visual Studio components. When saving something of type 1.99m or has 1,99 in textbox the data goe...
asked by 23.08.2014 / 16:40
1
answer

Get value from a field in the view in a controller [closed]

From the answers here, I could not get it. I have this view @{ ViewBag.Title = "ExcelFinancing"; Layout = "~/Views/Shared/_Layout.cshtml"; } <!DOCTYPE html> <html lang="pt-br"> <head> <meta name="viewport"...
asked by 18.09.2018 / 20:16
1
answer

Problem in the size of the FK name

I have a WebApi to work with a database of Firebird 2.5 , I used at the time the EF, but today it is presenting me with the following error    "The name 'FK_ARRUMACAO_CHECKLIST_ARRUMACAO_ARRUMACAO_ID' is longer   than Firebird's...
asked by 21.09.2018 / 20:33
1
answer

File download with mvc is giving a stick

I did several searches on the net to find a way for me to generate a spreadsheet and save to disk. As it comes to the web, this can only be done via download, and all examples searched (at least for me), I fall into FileResult . Turns out it'...
asked by 18.09.2018 / 17:06
1
answer

Problems creating crud, select and insert works, delete and update does not

Good afternoon, I need help with a crud c # This is the code where the class is, the strange thing is that select and insert are working normally, the problem is in update and delete //incluirCidade public void incluirCidade()...
asked by 12.10.2018 / 19:56
1
answer

Relationship 1x1 (or not)

I have 2 entities: Product Order and Product ... Using the fluent API as I say to my entity Requested Item that it has a Product? Note: The product entity can not have dependencies, although 1 product can be in several items. I do not w...
asked by 07.08.2018 / 17:41
1
answer

How to make the Controller get the "LinkText" Text from @Html.ActionLink

In my application there was a need to make the same Controller called Classification have the Reclassification function, so I want the ControllerClassificar to get the string LinkText @Html.ActionLink to be able to cont...
asked by 14.08.2018 / 23:15
1
answer

How to perform a query in HQL in C #?

I need to create an HQL query inside a C # method. The structure looks something like this: I have the method: IList<int>GetListYear(Guid educationalInstitutionId, Guid academicLevelId, Guid? locationId, Guid? programOfferedId) { //I...
asked by 11.06.2015 / 17:03