Questions tagged as 'c#'

1
answer

Methods in Entity in DDD architecture

Could you help me with a question. In DDD architecture what types of methods should I put in my Entity and which ones should I in my Domain Service? I know that in my entity I should by at least the entity's own validation method, and when to th...
asked by 22.10.2015 / 21:01
2
answers

How can I save TXT file in C: \ directory using C #?

I'm trying to make a small program for scrolling data and I want it to save a .txt file that stores the scrolls so it can be read later. The program is practically whole ready, all the features working, but when I try to select the directory whe...
asked by 30.10.2015 / 13:17
2
answers

Execute method on server when closing browser

I need the user to close the browser or the page tab, update the Logged status that is in the database (for user access control). To do this use the following Method JavaScript : window.onbeforeunload = function (event) { PageM...
asked by 04.09.2015 / 16:50
1
answer

How to put today's date as the default value in a texbox as input type date?

I have a page to search for a sales report and I use a textbox that generates a input type "date", and every time the page loads the value of the field is "dd / mm / yyyy". I would like that whenever the page was loaded the fiel...
asked by 03.09.2015 / 16:23
1
answer

Enter additional data, from the bank, into the User's Claims. What is the best time or the right way to do it?

I have some extra information that I need to add to user claims that are from other tables and classes. Given the method generated by the ASP.NET MVC template with Identity in class ApplicationUser : public class ApplicationUser : I...
asked by 10.09.2015 / 02:25
2
answers

Javascript - Populating a field with paragraph

I'm developing a javascript to populate a text box, however I came across a situation that is generating me difficulty. I need popular with this message for example: TEST TEST TEST But I can not bring row breaks when I populate the f...
asked by 28.08.2015 / 15:30
3
answers

How to receive a pdf file via ajax?

I am using this method to return a PDF file. It works normal if I call this action directly via URL: public ActionResult GerarProva(int idEpo, int numero, bool existeProvaGerada) { try { var relatorioBll = n...
asked by 18.08.2015 / 18:51
1
answer

Fluent NxN Mapping of Classes with Compound Key

I have two classes that have composite primary keys, for example: Cliente : public class Cliente { public int EscritorioId { get; set; } public virtual Escritorio Escritorio { get; set; } public int Id { get; set; } }...
asked by 18.08.2015 / 21:00
3
answers

How to serialize a class to C # file?

How do I serialize a class to a file in C #? I have a class [Serializable] public class MyClass { public int MyNumber { get; set; } public string MyName { get; set; } }     
asked by 21.08.2015 / 22:10
1
answer

Remote Connection, C # with SQL Server (2008)

I'm new to C #, and I'm trying to connect my C # application remotely with a SQL Server database that is on another PC (the PC is not on the same network, it's my friend's), but it is giving error. A before they say that I have already set up th...
asked by 07.07.2015 / 01:07