Questions tagged as 'c#'

1
answer

How to retrieve all checkboxes

In the code below, I have tried to retrieve all the checkboxes but I can not bring anything, I would not like to put ID, but retrieve countless selected checkboxes, what can I do? I just put 2 as an example: ( Code Behind ) <div class="f...
asked by 22.05.2017 / 20:25
1
answer

How to get value from TempData with Listobject?

Follow the code below: List<object> list = new List<object> { "abc", // string 1, // int true // bool }; TempData["ID"] = list; The following code can not fetch value: var data = TempData["ID"...
asked by 21.05.2017 / 05:21
1
answer

What is the best way to read an IPTC header from an image? W#

What is the best way to read the IPTC header of an image? I have the following image and I had to read the description of it (for a bank of images), but I already researched many forms that were confusing for me. Has anyone done this and can you...
asked by 25.05.2017 / 17:30
1
answer

Doubt with @ Style.Render

If I put in my view Layout this line: @Styles.Render("~/Content/css") I'm stating that all .css files in Content folder will be rendered? That is, I do not need to explicitly put .css in my view , is that it? If ther...
asked by 21.05.2017 / 15:21
1
answer

Returning two objects from the repository

My application is divided as follows: Repository - > Access to Progress database Controller - > Receives feedback from Repository and sends to View View - > Receives feedback from Controller. Next, my Repository looks like this:...
asked by 26.06.2017 / 14:13
1
answer

How to call another action and return the value?

Follow the code below: public ActionResult Teste1(int num1, int num2) { var valor = Teste2(1, 2); //Aqui recebe valor nulo } public ActionResult Teste2(int num11, int num22) { //Alguns valores aqui... var valor = 123; return null;...
asked by 03.05.2017 / 00:21
1
answer

DLL Not Found

When I run my application, I am aware of the error warning, stating DAL.dll was not found. I have no idea what it can be, I'm following a tutorial, these are my first steps with C #. I'm using VS 2017.     
asked by 27.04.2017 / 01:38
1
answer

Returning difference between dates with days and months

I'm developing a C # function that calculates the interest applied to a particular account. for this it is necessary to know the correct difference between days and months. How can you perform a function in C # that returns the number of days...
asked by 19.07.2017 / 00:46
1
answer

Help with join in lambda query

I have the classes: profissional { int id; int idUnidade; string nome; } unidade { int id; string nome; } profissionalUnidade { string profissionalNome; string unidadeNome; } I'm doing a query like this: list...
asked by 12.07.2017 / 20:15
2
answers

Where to put an object that is not an entity in the DDD

My project in ASP.NET MVC in C # has a Domain layer where I have entities, and business rules. I need to add a new rule where I should return an object with an internal list, but I ended up having a discussion about DDD rules with my colleagues...
asked by 14.07.2017 / 14:13