Questions tagged as 'c#'

1
answer

Read HTML file

In my project I need to read an HTML file that in the source code has a structure of an xml. I need to read this HTML file, get the value of the xml tags that have there make a whole process to save this data in my database .... Read an xml,...
asked by 14.07.2015 / 21:27
1
answer

Catch data from WebService in Action from C #

I have an application that accesses third-party WebService. To improve the testing process, I'm setting up a Web site to simulate the WebService. This site consists of several Actions, which return the XML, simulating data. This part is ok ....
asked by 26.06.2015 / 20:42
1
answer

Associative table mapping with Entity Framework

Abstracting some details I have these classes: public class Department: Entitie { public string Description { get; private set; } public DateTime CreateDate { get; private set; } public virtual ICollection<Service> Services {...
asked by 26.06.2015 / 17:56
2
answers
1
answer

Fluent NHibernate - Key Mapping Compound

Greetings, I'm having a hard time and I can not solve it. I have an application where I created the mapping and everything was working perfectly, but now I need to change it and that's where the problem comes up: I used NHibernate Fluen...
asked by 05.02.2016 / 20:32
1
answer

Remove X first elements from a string

I have the following code: copia = num.Text; copia = copia.Substring(cobrar.Length + 1, copia.Length); num.Text = copia; Example: cobrar = "teste"; copia = "numero"; num.Text = cobrar + copia; //não é só isso, por isso quero rem...
asked by 24.09.2015 / 22:13
1
answer

Unity: How to navigate between two points on a sphere?

I need to create a navigation system between two points on a sphere, the problem is that since Unity's NavMesh does not work with spherical objects I have to calculate and manually position the object to its destination. I created a logic tha...
asked by 29.12.2015 / 22:20
2
answers

Update data using LINQ

I've read that LINQ should be used for queries, but in the context below, the best way I found to update was using let . var produtos = from o in orcItens join p in Produtos on o.Id equals p.Id let x = p.Estoque -= o.Quant...
asked by 02.01.2016 / 02:18
1
answer

Convert a .pdf or .p7s file to base64 in C #

I want to convert a .pdf or .P7s file to base64 in C # which should be loaded into XML. How can I do it? EX: <conteudoArquivoP7S> MIMCmfgGCSqGSIb3DQEHAqCDApnoMIMCmeMCAQExCzAJBgUrDgMCGgUAMIMCexwGCSqGSIb3DQEHAaCDAnsMBIMCewclUERGLTEu...
asked by 12.05.2015 / 16:54
1
answer

Why is my CONTROLLER not picking VIEW fields?

I'm doing a form in the VIEW, but the fields where I use radio and select (option) are not passing their values to the Controller. If anyone knows why. My VIEW: @model GerenciadorDeAtividades.Dominio.RecursoDominio @{ ViewBag.Title = "...
asked by 14.05.2015 / 16:03