Questions tagged as 'asp.net-mvc'

2
answers

How to structure a solution separating WebApi from WebUI using ASP.NET Identity?

How should a solution be organized that will have at least three projects, such as: Class Library as Infrastructure Web Application as Web Api MVC Web Application for WebUI (user interface) Where ASP.NET Identity will be used as an au...
asked by 20.11.2014 / 01:58
2
answers

Is the term Asp Net MVC correct?

Is it correct to use the term Asp Net MVC? It seems like they are two different things, like, in MVC we do not use any Asp Net components, do we use either HTML or Razor or both? I know that in addition to Razor we can also use aspx , but...
asked by 04.11.2015 / 11:21
3
answers

nullable on models?

What is the nullable in a model? For example: public int? ProjectId; If I put this way'm accepting null values, right? And if I put the annotation required on the property, is it required not to have the value be null or would it? Why...
asked by 11.09.2014 / 23:11
1
answer

Queries in asp.net mvc with entity framework

I'm starting a project in ASP.NET MVC 5 with Entity Framework 6 , along with mvc studies. This to have a better learning, and I came across the following doubt. In the controller I have the Index method, which literally returns a " se...
asked by 13.09.2014 / 01:06
3
answers

How to intercept exceptions when working with the Entity Framework?

I want to handle the errors returned by the Entity Framework. In this example I'm forcing the insertion of a duplicate record (Name already in the database where the column of the table is configured as a Unique Index ): [HttpPost] [Validat...
asked by 13.06.2014 / 02:31
4
answers

How to call a "Stored Procedure"?

How to call a procedure in ASP.NET C #? Here's my simple procedure: CREATE PROCEDURE GetAdmin ( @email VARCHAR(50), @password VARCHAR (50) ) AS BEGIN SET NOCOUNT ON; SELECT * FROM Admin WHERE Email = @...
asked by 13.02.2014 / 18:44
2
answers

Error using the File.Delete method inside the Controller

I'm having problems with my controller the moment I start a file exclusion routine. I'm using the File.Delete() method, but it just does not recognize and returns the following warning:    Can not choose method from method gr...
asked by 14.02.2014 / 13:19
1
answer

Is it safe to save multiple entities at the same time in the ASP.NET MVC Controller?

I need to save 12 entities to the same method in Controller , I do not know if I'm doing it right. In my method Create of Controller , I call all entities and add all attributes in the same View . When you click the save button, you...
asked by 26.01.2015 / 20:35
1
answer

Simple Injector + UoW + DDD + Multiple Contexts + Entity Framework

I need to know how to apply IoC for two contexts. The scenario is as follows: I have a Layer called Core (allocates classes that I can reuse in other layers), where I put the interface of IDbContext, IUnitOfWork and UnitOfWork (among ot...
asked by 03.12.2016 / 20:58
3
answers

CheckboxList in ASP.NET MVC

I need to create a checkboxlist on my page using MVC (Razor). I noticed that there is no Html helper of type Html.CheckboxlistFor or something like that. Someone has some example of how I could do this. If possible, what would the code look l...
asked by 17.02.2014 / 21:11