Most voted "viewmodel" questions
32 questions
Sort by count of
-
15
votes2
answers4119
viewsDifference between DTO and Viewmodel?
In this question we can see that it is Viewmodel: What good is a Viewmodel in ASP.NET MVC? In this other question we can see what DTO is: What is a DTO? But after all: What is the difference between…
-
13
votes2
answers1340
viewsWhat good is a Viewmodel in ASP.NET MVC?
I’m used to the MVC approach of frameworks as Cakephp and Laravel. Now that I’m getting deeper into ASP.NET MVC, I’d like to understand what this Viewmodel is for. What is the purpose of the…
-
5
votes1
answer433
viewsAutomapper Entities Viewmodel
I am with a scenario where my context returns a query referring to two entities User and Cartaocreditousuario, as the following scenario below. During automapper action on my Viewmodel, is not…
-
4
votes2
answers216
viewsView 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 doubt lies in the time to create the Viewmodels, I would have to have…
-
4
votes1
answer497
viewsStore content / variables in Model - PHP MVC
Hello, I’m starting to study the MVC standard for PHP. I’ve read several questions here at Stackoverflow, I’ve studied the Laravel documentation and read several articles. I chose the concept…
-
3
votes1
answer165
viewsIn MVVM can a Viewmodel know more than one model?
In the MVVM architecture, a viewmodel can "meet" several viewmodels. What about the VM-M relationship? A viewmodel can "meet" several models different? Ex: CreditCardViewModel --> Model…
-
3
votes2
answers206
viewsWhere to place the View Model rule
I need to create a View Model to use on the screen. I’m wondering where to put the button rule be enabled or not. I thought about this implementation, I would like to know if it is the best way.…
-
3
votes1
answer699
viewsHow to use Viewmodel in MVC 5 C# with Entity Framework?
I’m trying to learn how to use the concept of Viewmodel, so I did a basic project, but I’m having difficulties. I have the following models: Person id guy document Physique id name surname document…
-
2
votes1
answer1172
viewsHow to use Automapper 6.2.2 in Asp MVC5?
Hello, how to use Automapper 6.2.2 on Asp MVC5 to map my view models to the domain model. Example: in MVC I use Usuarioviewmodel and in the User domain.
-
2
votes2
answers1383
viewsPick up a selected item on Dropdownlistfor using an ASP.NET MVC Viewmodel
I am trying to register a Subcategory that needs a Category. I have Subcategoriaviewmodel, where I created the fields public IEnumerable<CategoriaViewModel> Categorias { get; set; } and public…
-
2
votes1
answer272
viewsIs it correct to use List with Viewmodel?
I own the ViewModel down below: public class Crm_AnaliseViewModel { public string TAG { get; set; } public int ATUALIZACAO { get; set; } public string RELATORIOS { get; set; } } Then in the…
-
2
votes0
answers139
viewsWhat is the best technique to use Viewmodel with C#mvc lists?
I have two templates: event registration package and registration package, where the event registration package template has a list of registration packages (see code below, removed some fields).…
-
1
votes2
answers68
viewsViewmodel with INSERT in two controllers
I own two Controllers: 1 - Register the CPF (CPF, Name) 2 - CPF Phone Registration (CPF, DDD, Telephone) Viewmodel: using System; using System.Collections.Generic; using…
-
1
votes1
answer286
viewsRetrieve the value of a dynamically generated field
Good morning. Staff would like to know how do I recover the value of the control that is generated dynamically in my form at runtime? Type below in the image I have a class that brings all the…
-
1
votes1
answer31
viewsHow to modify this query to get the desired result in Codeigniter?
I have an SQL that returns to me the following: 1: Hacker And Automobiles OR 2: Food and I need her to return to me: 1: Hacker And 2: Cars or Food The code I have so far is: if(!$final['termo'] ==…
-
1
votes2
answers103
viewsTransforms string to decimal within an object
I made a Viewmodel, where in the database the CPF field is decimal(11.0) and in the VM I put as String. In my API the CPF is decimal. Well, when I fill out the field and send the form to the API,…
-
1
votes0
answers60
viewsGood Practices and Use of Datetime in Viewmodels List
I’m making a system for the client, and he dismissed the use of fullcalendar, which would be practical. With this, I created in a table with the fields Agendaid(int), and Scheduling(Datetime) years…
-
1
votes0
answers30
viewsProblems with Count method in a Django queryset
I’m in a strange situation with Django and Count method, I have a queryset that I called ranges and then I have a variable qtd_intervalo where I store the intervalos.count() then I do the tests: if…
python django web-application method viewmodelasked 4 years, 1 month ago Artur Fernandes de Souza Filho 21 -
0
votes0
answers265
viewsError with Automapper
i have trouble mapping child classes in automapper, qndo do viewModel for model. Has anyone ever had that kind of problem? thank you very much I’ll post the classes public class…
-
0
votes1
answer172
viewsIs it right to create a viewmodel for registration (post) and another for consultation (get) of a User entity?
I am taking my first steps in Web API. I created a Viewmodel of the User entity, I will use it for user registration. Now, when returning the data, it has fields, like the password, which I don’t…
-
0
votes1
answer144
viewsDoes Angular use the MVVM?
I have some doubts about the design of framework Angular The framework actually uses MVVM in full or only a few principles? Component is entirely a Viewmodel?…
-
0
votes2
answers115
viewsHow do I call two models in one view?
Good morning people, I’m new to Asp so my knowledge is very low, could you help me with this question? I have a query view that already has a "BOOK" model, and in this same view I intend to leave a…
-
0
votes1
answer39
viewsAngularjs and C# - model does not bring value if not changed
I have a form where some fields are numeric (decimal format with 2 houses). I’m displaying formatted and masked, all correct. What happens is that when I edit one of the values, this edited value is…
-
0
votes1
answer444
viewsAutomapper Relationship one for many - Model to Viewmodel (and vice versa)
MVC scenario, where Controller talks to Application who talks to Domain. I’m trying to map one to many with Automapper. This is my Model: public class Estado { public Guid EstadoId { get; set; }…
-
0
votes2
answers225
viewsProblems saving a selected item in Dropdownlistfor using a Viewmodel
I’m trying to save a change I try to make by selecting a Category in a Dropdownlistfor. Kind of: I keep following the Debug and the View is sending the selected Category, but I am not able to…
-
0
votes1
answer179
viewsError when trying to perform a Relationship belongsToMany in Laravel
I am trying to effect a relationship belongsToMany in my Model but is bringing the error: Queryexception SQLSTATE[42S02]: Base table or view not found: 1146 Table 'api.codigo' doesn’t exist (SQL:…
-
0
votes0
answers25
viewsHow to change the Model data being shown in Gridmvc?
I have a Gridmvc in my form where displays a list of units, in this grid has a text field, and a checkbox, I would like when the user type some text box or catch the check, this change reflected in…
-
0
votes1
answer61
viewsI would like to understand why when Modelstate is invalid, Viewmodel instantiation is "ignored" and form fields remain populated?
Follows my code: Subcategory Model public class SubCategoria { public int Id { get; set; } [Required(ErrorMessage = "Campo {0} é obrigatório")] [StringLength(200, ErrorMessage = "Campo {0} precisa…
-
0
votes1
answer65
viewsKotlin - Pass data between Fragments
I’m having a problem with an app I’m designing. I have 3 Fragments ( F1, F2, and F3): In F1 (contains a list with a series of sports) the user makes the choice regarding a sport (I use a Recycleview…
-
0
votes1
answer32
viewsHow can I resolve this NPE error when fetching data in an API?
I’m looking to do a search on the Github API using Kotlin Coroutines in a different thread than the main one, but by receiving the values, it’s generating this error: 021-01-27 19:50:22.961…
-
-1
votes1
answer76
viewsModel list arrives outdated in controller - Asp.Net mvc
I have a Viewmodel with two object lists. The first of them is has an editable column, where it is possible to change a numerical value. After changing the values of the "Listtypes" in the view, it…
-
-1
votes1
answer44
viewsViewmodel connection to Repositorio
Hello, all right? I have a scenario that is the following: on Android I need to connect my Viewmodel with Repository. I managed to do, though, I just don’t know if I did it the right way. Inside my…