Questions tagged as 'c#'

0
answers

Can not implicitly convert type

I'm having trouble instantiating the service. It is generic and I need it like this, since I can use any entity in it. When I start the service in hibernate, I need to pass the entity I'm going to work to use the bank mapping. That is, when you...
asked by 24.08.2017 / 21:25
1
answer

Change ConnectionString to AppData / Roaming

My application has installed the .mdf database in AppData / Roaming. Now I need to probably change my path from ConnectionString to this place. How do I do that? I read on the internet about using Environment.GetFolderPath(Environme...
asked by 18.08.2017 / 02:26
2
answers

E-mail sending C # The remote name could not be resolved

I'm testing the application's email sending for a password recovery option, I tested it several ways, including email from another domain and hosting, and everything works fine, I tested it with email from gmail and everything works fine , more...
asked by 19.08.2017 / 05:09
0
answers

Insert data with Entity and no field identity

I have this method to insert into the database: public virtual void Inserir(T item) { contexto.Set<T>().Add(item); contexto.SaveChanges(); } And I have this in my Product entity, for example:...
asked by 17.08.2017 / 00:07
0
answers

Session TimeOut MVC 5

I'm trying to implement the Session Timeout in an MVC5 application. I have the following string in Web.config: <sessionState mode="InProc" cookieless="true" timeout="15" /> I created the class: public class SessionExpireAttribute...
asked by 04.08.2017 / 07:00
0
answers

The type is defined in an assembly that is not referenced

I have a project called DataLibrary , the .dll is referenced in another project of mine, but for some reason, when compiling VS it gives me an error saying there is a type that is set to DataLibrary mas I need to add a reference. I...
asked by 02.08.2017 / 19:37
0
answers

Connection to the slow database

I have a program in C # that when the start and ask to show me the data inserted in the Sql Server takes to open, but after this time is already faster. Is there a way to be faster first time? My connection is made this way and only use store...
asked by 02.08.2017 / 14:13
1
answer

How to remove sound from Windows BIP in C #?

I hope you are well. I've developed a C # application in Visual Studio, but by pressing the 'TAB' key to switch from textBox1 to textBox2, it makes the Windows sound (which is actually the ENTER key that I changed in the script). How do you get...
asked by 02.08.2017 / 01:46
2
answers

C # and Sql Server, inserting with proc using BEGIN TRAN

Good evening! I am inserting a record using C # and Windows forms , I am using a proc that inserts into two tables at the same time, the code is working, but I created a rule that the store can only have only 1 manager, I threw a select in t...
asked by 02.08.2017 / 03:41
1
answer

How to do JSON data request

I need to collect some data from a program that has API: PipeDrive API Reference If I understand correctly, for each task, a URL will be generated to make Requeste data, for example: https://api.pipedrive.com/v1/deals?stage_id=4...
asked by 11.08.2017 / 18:04