viewmodel Questions
2
Solved
I just started learning about ViewModels in ASP.NET MVC. So, I thought of implementing a sample example as below:
Business Entity
public class AddModel
{
public int a { get; set; }
public int b...
Scarface asked 2/12, 2013 at 8:24
2
Solved
I have an MVC 4 application with several views. I.e. Products, Recipes, Distrubutors & Stores.
Each view is based around a model.
Let's keep it simple and say that all my controllers pass a ...
Menendez asked 25/11, 2013 at 3:48
4
In my project I'm using EF Code First approach. I have a repository layer, service layer and presentation layer (ASP.NET MVC). I'm using a dedicated viewmodel for each view.
What I'm confused...
Gilkey asked 12/11, 2013 at 15:15
2
Solved
I have a list of Contact objects, from which, I just want a subset of attributes. So I used LINQ projection to create an anonymous list and I passed that to a partial view. But when I use that list...
Disparate asked 2/7, 2011 at 19:4
2
Solved
I'm looking for a simple way to call a method in my Main Window, but I want to call it from my View Model. Basically, I'm looking for some king of "this.parent" sort of thing to put in the View Mod...
2
I am trying out ASP.NET MVC Framework 2 with the Microsoft Entity Framework and when I try and save new records I get this error:
Mapping and metadata information could not be found for EntityTyp...
Trantham asked 14/6, 2010 at 1:14
1
Solved
I have an WPF application which can take command line parameter. I want to use this command line parameter in ViewModel, I have following options to do that.
1) create public static variable in ap...
Rail asked 5/10, 2013 at 11:10
2
Solved
I am new to Knockout.js.
What is the best way to select() an <input /> when it becomes visible?
View:
<p>
Name:
<b data-bind="visible: !editing(), text: name, click: edit">&...
Ethel asked 6/9, 2012 at 7:19
2
Is there a way that I can invoke the model binder for a single object?
I don't want/need a custom model binder - I just want to do something like this:
MyViewModel1 vModel1 = new MyViewModel1();
...
Prostatitis asked 29/9, 2011 at 15:9
1
Solved
I've been studying the MVVM pattern and putting it into practice in a Windows Phone 8 app, and I have a question about the best practices for initializing and accessing ViewModels in an app.
When ...
Beecher asked 24/9, 2013 at 8:15
5
Solved
OK, I have been hearing discussion about "ViewModels" in regards to MS's ASP.NET MVC.
Now, that is intended to be a specific kind of Model, correct? Not a specific kind of View.
To my understandi...
Sternmost asked 31/10, 2010 at 1:21
1
Solved
I'm sure this will be a slam dunk for someone... fingers crossed
My ListView ItemsSource is bound to a Property on my ViewModel named TileItems.
Populating the list view updates perfectly.
In ...
Sha asked 2/9, 2013 at 19:15
5
Solved
I have some custom editable listbox on my wpf window.
I also have a viewmodel class with Property Changed which looks like that:
public bool HasChanges
{
get
{
return customers.Any(customer =&g...
3
I have two views that share one observable collection from certain viewmodel, but with different collection view parameters. What is the correct way of implementing it in MVVM Light? Is there any s...
Gough asked 13/5, 2011 at 10:39
4
Solved
I am wondering if it is possible to use Knockout.js's ko.applyBindings() multiple times to bind different ViewModels to one part of a page. For example, let's say I had this:
<div id="foo">....
Bifilar asked 26/12, 2012 at 20:27
4
Solved
I had a talk with teamlead about this topic and from his point of view we can just use bindings and commandings omitting ViewModel, because we can test UI behaviour without VM using Automation or o...
2
I am trying to create some Sample Data from my ViewModel classes in Expression Blend.
However Expression Blend stops and says "Object reference not set to an instance of an object". Personally, I ...
Wallaroo asked 14/2, 2011 at 11:26
3
Solved
I am using Microsoft MVC and C#. I have a usercontrol (example.ascx) created and at the top I'm inheriting System.Web.MVC.ViewUserControl<PostTransferViewModel>
Now, while my model name is a...
Aerify asked 24/2, 2010 at 13:32
5
Solved
I am new to both MVC and Entity Framework and I have a question about the right/preferred way to do this.
I have sort of been following the Nerd Dinner MVC application for how I am writing this ap...
Shigella asked 22/2, 2011 at 14:41
3
Solved
Let's say I have a page that allows the editing of a user's details, so I have a ViewModel like this:
public class UserViewModel {
public string Username { get; set; }
public string Password { g...
Filter asked 14/5, 2013 at 16:32
1
Solved
I want main viewmodel to have a certain list, and then access from many other viewmodels.
For example, in MainViewModel.cs I will have a list of 50 numbers,
then in NumListViewModel.cs, I'd like t...
3
Solved
I've started using (as of, a few hours ago) Durandal with the hope to manage views and allow composition within a single page - the previous approach, also using Knockout, was getting too unwieldy ...
Debauchee asked 10/3, 2013 at 21:9
1
Solved
I need to send data in the form of a list for two different models in my database to a view in an MVC4 project.
Something like this:
Controller:
public ActionResult Index()
{
Entities db = new...
Dag asked 1/5, 2013 at 5:46
3
Solved
I am writing this major memory trainer using the MVVM pattern by animating labels containing 2 digit numbers across the screen and asking the user to quickly type in the corresponding mnemonic for ...
1
This is a WPF application.
Background:
I essentially have a Wizard application. The Wizard is initialized by providing a list of ViewModels. These ViewModels will create the appropriate view base...
© 2022 - 2024 — McMap. All rights reserved.