Questions tagged as 'c#'

2
answers

Data search with Entity Framework

I have a project in Asp.Net MVC where I need to work with a large volume of data. To get them from the Database (Microsoft SQL Server) using Entity Framework 4 I basically know three ways: 1st form: var resultado = from p in db.Pessoa...
asked by 17.02.2016 / 12:34
2
answers

Removing character double quotes "

I have a code that reads a CSV and saves the information in the database, however I ended up getting a "different" CSV from what I am used to reading. This CSV comes with double quotation marks in the information. Ex: "0", "20151109", "171729...
asked by 21.03.2016 / 19:24
1
answer

Returning the values of a model dynamically in .NET MVC

I have an authentication class that stores the user ID in a session, which receives the model name corresponding to the current user, such as users, admins, clients. Example: Authentication.Guard("users").Attempt(user.id) However, in thi...
asked by 28.06.2016 / 21:09
2
answers

Which object performs best? SqlDataSource or DataTable?

In terms of performance, speed, or security, what is the best object to use as a DataSource ? Example, I am creating a DataSource , to popular a GridView : By SqlDataSource : this.sqlDataSource1.ConnectionName = "...
asked by 27.07.2016 / 15:35
1
answer

Change port or something else in IIS Express. Has as?

How can I change a port or something in Visual Studio 2013's IIS Express.     
asked by 11.07.2016 / 23:09
2
answers

Find specific value within a .txt file C #

I have a .txt file with the following lines: 000-000 = CRT 001-000 = 00000021 009-000 = 00 012-000 = 247823 013-000 = 0000559877 022-000 = 24082017 023-000 = 152842 032-000 = 80F1 100-000 = JORGE EXPEDITO 307-000 = S17SNSNNNSPSS9MSNN00 3...
asked by 25.08.2017 / 14:01
2
answers

View Model should have related classes?

I have three entities: Manager , PersonalData and Address . A Manager has a PersonalData and a PersonalData has a Address . My question is when creating ViewModels , I would have to have a proper...
asked by 12.07.2016 / 23:15
1
answer

How to calculate days, ignoring hours

How can I calculate if you spent 1 day, ignoring the hours. Explaining, it would look something like this: I have a date 2017-09-09 11:45:20 , normally it would have been 1 day, when the 11:45 arrived the other day, however I would li...
asked by 10.09.2017 / 18:21
1
answer

My software is being blocked by Windows Smartscreen

I'm developing software, and by testing the executable on another computer gave me this message from Windows Smartscreen. I do not know what it's all about, I've already researched it and found nothing that would help. What is it about...
asked by 15.06.2016 / 21:24
1
answer

How to make notification through the taskbar in C #?

For my app I'm developing I'm creating a icon that will stay on the taskbar to show the notifications to the user and inside it the user will have options like: Exit, Open, Configure and etc, but I have no ideas how to do this. I have b...
asked by 29.05.2016 / 19:23