» Home » Model » Page 1
Model binding in controller when form is posted - why to use view model instead of class from domain model?
by Victorian Gray in Programming Languages

I'm still reasonably new to ASP.NET MVC 3. I have come across view models and their use for passing data from a controller to the view. In my recent question on model binding two experts suggested that I should use view models for model binding as well.

This is something I haven't come across before. But both guys have assured me that it is best practise. Could someone maybe shed so

EF 4.3 CodeFirst MVC3 WebApp and console use same model, but somehow they 'see' a different model which results in a model backing error
by piratus in Programming Languages

I'm using the same model for multiple applications: MVC3 web app, Windows services, and a console application. When I start the MVC3 web app, it generates the database. I can restart it, and everything is fine. But when I start the console application I get an error:

The model backing the '...Context' context has changed since the
database was created. Consider using Code

Rails - Belongs_to Model, where Model can be any model implementing the relationship?
by NeoTubNinja in Development Tools & Services

Is it possible to implement, in Rails 3, an association

class ApiCredentials < ActiveRecord::Base
belongs_to Model

where Model can be any model.

Then in the api_credentials table, I have fields like model_id and model to track this association.

I don't assume that

Need help creating a Model and migration for Tag model for Post model (Rails)
by Ted Leung in Programming Languages

I have a Post model and I would like to create a Tag model so that posts can have tags (more than one at a time). I want to be able to search a post's tags and search posts tagged as X.

This is what I've realized so far in order to make this work (correct me if I'm wrong):

The Tag model only needs a :name attribute and the Post model needs a :tag_list

Checkboxes for models, two submit buttons: add person model to group model, reject person model from group model
by imported_bman in Web Design

I've looked at formset and model formset at Django many times, but I still can't figure the smart way to do this.

I have two models:



I have a queryset that contains all the persons trying to join a particular group: Person.objects.filter(wantsToJoinGroup=groupD)

Now, what I want to do

MVVM WCF Entity as Model… How to implement propertychange notification in the view model when using Entity as your model
by Creig in Coding

I am implementing an MVVM Pattern using Entity as my model... When I instantiate the Model in the setter I add a propertychanged handler to the object to capture the field changes within the entity object...

When I step through code I find that after I modify the field within the object it is firing the Property Change event multiple times...
It has led me to believe that I ha

Adjecency List Model OR Nested Set Model, which data model should I use to store my hierarchiecal data?
by Navin in Databases

I have to store messages that my web app fetch from Twitter into a local database. The purpose of storing messages is that I need to display these messages in a hierarchical order i.e. certain messages(i.e. status updates) that user input through my application are child nodes of others (I have to show them as sub-list item of parent message). Which data model should I use Adjacency List Model

Can I use a model as Inline on a model where the foreign key is over another model?
by DaveF in Web Design

This are my models:

class Image(models.Model):
class Size(models.Model):
image = models.ForeignKey(Image)
class Physical(models.Model):
size = models.ForeignKey(Size)

I'm trying to add Size and Physical as an Inline on ImageAdmin. The user has to create some sizes, before he can add some physi

How to model this in django (inherited model, where each inherited model has a unique method)
by Anubis in Programming Languages

How to model this in django:

1) have a base network of manufacturers

2) under each network their might be several distributors

3) a user of the system can access items through the distributor

4) if a user access the item through the distributor we want that item to be translated where each manufacturer will have their own translation

Error in Model classes after creating Model.Context and Model classes in ASP.Net MVC 4
by Jarques in ASP & ASP.net

I have generated xxxModel.Context and xxxModel template (in Models) from an existing database using EF 4.1 on ASP.Net MVC 4 application. After that when I build the project it gives the error for all the Model classes (POCO) saying "The type file name already contains a definition for memeber variable name". Where am I going wrong?

Thanks for help.


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .