Questions tagged as 'asp.net-mvc'

1
answer

Saving multiple values of an enum in the database

I would like to be able to save several options of an enum (day of the week) something like 1.3.5 (Monday, Wednesday, Friday) As the modeling described here. I created a model public class Horario { [Key] public int ModalidadeProfessor...
asked by 05.10.2016 / 16:13
2
answers

Pull data to an input when typing in the field

I need a script that, when I type a word inside a field, it pulls all the data that is related to that word, like an example Facebook, in the search bar, when we will type something it already comes bringing everything that is related to it, cou...
asked by 03.03.2017 / 20:42
2
answers

Problem with connection between EF and PostgreSQL

I'm trying to make a connection to EF and PostgreSQL in an Asp.Net Mvc application I'm using the following references EntityFramework6.Npgsql Npgsql 3.1 .NET Framework 4.5 I have the following classes: public class Categoria {...
asked by 18.02.2017 / 18:48
1
answer

Error When Adding Controller in ASP.NET MVC

A question when creating a controller . Because trying to create it has presented the error of the attached image. I created 3 small classes: Dependentes , Tipobenef , TitularPlano and ProvaContext [Table("depende...
asked by 02.01.2019 / 03:56
1
answer

How to refresh the context? ASP.NET

I'm starting to develop in ASP.NET and I always have a little problem. When I need to generate a context (that class that will reference with the bank), example below: I do the following: Botão direito em cima do projeto -> Add...
asked by 11.06.2016 / 01:15
1
answer

Store ListMenu In Memory or in Cookie

Good afternoon. I have an application that has a whole level of permission management for page access and a number of other settings. Always when a user authenticates, I mount a list with all the menus (links / pages) that this user can ac...
asked by 11.04.2016 / 20:36
1
answer

Doubt with version of AspNet.Mvc

In my packages.config I have the following settings: <?xml version="1.0" encoding="utf-8"?> <packages> <package id="bootstrap" version="3.0.0" targetFramework="net45" /> <package id="jQuery" version="1.10.2" targetFram...
asked by 04.01.2016 / 15:01
1
answer

Entity Framework Migration - Indicate migrations as performed

I'm working on an ASP.NET MVC system with Entity Framework, which uses Migrations. It has the following initializer: public void InitializeDatabase(Contexto context) { if (!context.Database.Exists()) { context.Database.Cre...
asked by 14.12.2015 / 20:00
1
answer

Database First - MVC

I've always worked with code first and using only one database. However, I need to work with an application with two databases already created. To work with two databases, I created this: Passing: Receiving: Now, how can I easily...
asked by 16.12.2015 / 13:41
1
answer

How to configure routes when the application is not in the asp.net mvc server root?

Locally my site has the following default route is everything works: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace Projeto.WEB.Celular { publ...
asked by 08.01.2016 / 17:03