Questions tagged as 'c#'

1
answer

Pagseguro Return - Solution

I use C # Asp.Net MVC, I had to make the return of data from Secure Pag and I found the documentation a lot flawed, follow the solution I created below for those who have the same difficulties.     
asked by 25.08.2015 / 15:30
3
answers

How to implement business rules or system rules using Domain Driven Design in C #?

I'm having second thoughts about how to separate business rules from system rules with DDD. If I have for example a class Usuario with id , nome , login , senha as properties. A domain rule would require a pass...
asked by 26.08.2015 / 23:49
3
answers

How to create mandatory exceptions in C #?

Is there any way to make a method throw an exception that should be handled when the method is invoked? I used throw new Exception("mensagem de erro") but the treatment is still optional when invoking the method.     
asked by 06.08.2015 / 02:33
2
answers

Difference of performance and situation of use of numerical types

I would like to know the difference between Long , Double , Float , Decimal and Int types, taking into consideration when it is best used in real cases. Ex: "use float in interest as it is ..." . And also the dif...
asked by 13.03.2014 / 15:23
1
answer

Problem with .Include () in the Entity Framework (Postgres)

I've been having a problem with EntityFramework, it's the following: When I use the ORM (.Include) string to join tables to foreign keys, it automatically renames the keys in the string automatically generated by it and ends up not finding it...
asked by 19.10.2015 / 17:11
3
answers

How to get the unmasked value of a MaskedTextBox?

I'm using a MaskedTextBox for document formatting. It is working perfectly, but how do I get the value typed in the field without the mask being present?     
asked by 22.04.2014 / 21:54
2
answers

How do I sign in through my application on Microsoft Live?

I would like to know how I can sign in through my application, either Web or Desktop, on Live? I've been looking for a few things, but I have not been successful. UPDATE So, as bfavaretto suggested, I downloaded a sample from microsof...
asked by 13.01.2014 / 19:21
3
answers

Architecture problem where access to construction methods must be controlled

I have a tree class that will have the addition of trunks, branches, leaves and fruits. I need the class to give access to certain methods only after others and that previous ones can not be access again. Example: public class Arvore...
asked by 15.06.2015 / 23:46
1
answer

Separate string by number of characters

I'm developing a component to read the file submitted by DataPrev with the list of monthly obituaries. This file is a TXT and every 210 characters is a different person. The documentation can be seen at this link : SISOBI . I'm used...
asked by 13.03.2015 / 16:09
2
answers

Best way to do an Action that does not return data

I am making an ajax call to change an object. The call does not have to return anything. Only the code http 200 (OK) or 500 (error). I'm using the following code in the action but I do not know if it's the best: return new EmptyResult(); Wh...
asked by 16.01.2015 / 01:54