Questions tagged as 'c#'

1
answer

Change the database instance

I'm doing a project in MVC and my problem is that my database is automatically created in the "localdb" instance, but I wanted it to be created in my instance that I created in SQL Server. p> Is there a possibility to change this? And if it ex...
asked by 05.12.2017 / 17:43
0
answers

My chat with signalR is not working, I already followed several tutorials and it does not work

Archive [ChatHub] using System; using System.Collections.Generic; using System.Linq; using System.Web; using Microsoft.AspNet.SignalR; namespace Sandes { public class ChatHub : Hub { public void Send(string nome, string mensage...
asked by 05.12.2017 / 19:27
1
answer

Entity Framework. Select only 1 from a list in the Include?

I'm trying to get just 1 record from the Phones and Emails lists. var lista = Db.Oportunidades .Include(x => x.Conta.Proprietario) .Include(x => x.Conta.Contatos.Select(c => c.Telefones)) .Include(x => x.Conta.Contatos....
asked by 05.12.2017 / 21:49
0
answers

How best to represent a FK in the domain

I have for example two entities in my DB. User_Type and User. User receives an FK of User_Type from the UserType field. In my Domain (C #) I would have: TipoUsuario public int IDTipoUsuario { get; set; } public string NmTipoUsuario { get; set;...
asked by 22.11.2017 / 21:05
0
answers

Error: The entity types 'CustomRole' and 'AspNetRoles' can not share table 'AspNetRoles'

I've created the entire Identity structure to work with INT instead of GUID. Using DataBase First and included in the database, with a create script, the Identity tables modified (just changed AspNetUsers). but every time I call: userManage...
asked by 22.11.2017 / 23:25
0
answers

Failed to open file after installation of application in C # WPF

I am creating a C # installer using visual studio 2017 installer project in this project there is a user manual it is contained in the root of the project, when I run it both in Debug or Release, Any CPU or x86 it works normal, however whe...
asked by 22.11.2017 / 23:07
1
answer

compare datatable with gridview

My question is as follows: I have a gridview that I populate it with a data table of a table called "DiscountDate", however I need a button that when clicked it will go into another table named "sectors" and go through each row of the sectors ta...
asked by 21.11.2017 / 15:23
0
answers

Call Alert When I Get a Value in the Session

Hello I'm trying to call a javascript alert as soon as I get some value in a Session. I'm using C # with ASP.NET Follow my code with the attempt to show the alert, but without success: @if((string)Session["alertaErro"] != null) { <...
asked by 22.11.2017 / 18:50
2
answers

Configuring AnglesJS Routes with ASP.NET MVC

I'm having trouble performing angular routing with asp.net mvc. I configured my routing in the app.js and when I click on my links the pages are not being redirected correctly, only page that appears correctly is the Home.html, but after I cl...
asked by 22.11.2017 / 15:27
1
answer

Web Components for Bank Data Search

I'm doing a small system for registering product items. As I came from Delphi I was looking for a way to load the products by code or by name in a Dropdownlist. I've been searching and seen a system that was using a component like I wanted...
asked by 24.11.2017 / 14:15