Click here to Skip to main content
15,897,273 members
Everything / Model

Model

model

Great Reads

by Ehsan.MA
Consider rigid body
by Mostafa Asaduzzaman
How to create a quick pie graph using MVC Model and CanvasJS
by Abhishek Kumar Goswami
This helps to make a visible date field in Chrome native datepicker while it will bind from the Model in ASP.NET MVC 4.
by coded007
A word about Unified Dimensional Model we use in analysis services.

Latest Articles

by Ujwal Watgule
Credit card fraud detection is an important application of machine learning techniques.
by Pete O'Hanlon
How to use arrays to manage multiple items
by Pete O'Hanlon
What is an array and how to use it to manage multiple items
by Uladzislau Baryshchyk
This series of articles consists of three articles, in which I will demonstrate step by step how to create a .NET core MVC project

All Articles

Sort by Updated

Model 

27 Dec 2023 by codiagirl
I have a child view name UploadImage and parent view name CROCOnfig, when I access child view by using button in parent view,it works fine, but when I try to render child view in parent view,it throws error that model is null. I have placed child...
15 Aug 2023 by Ujwal Watgule
Credit card fraud detection is an important application of machine learning techniques.
19 Jul 2023 by FuFu Dev's
I have a two models (Current and Original) that have the same properties. I want to build in a validation to check if one of the properties (Address - which is a collection consisting of "Country, City, Suburb, Code") have the same values or they...
19 Jul 2023 by PIEBALDconsult
If you have access to the code for the Address class, you can add the ability for them to compare themselves. The following is a very naïve example. Comparing addresses is a very complex topic with many pitfalls. public partial class Address...
1 Mar 2023 by Dave Kreskowiak
Is there a programming question in there somewhere? Writing code is what this site is all about, not doing motion capture.
1 Mar 2023 by mohamed gawdat
An important note I want to pay attention to facial expressions What I want is to make cartoon characters that don't look like the human body, such as Inside Out, Monster Aliens, or Monster Corporation. Will mocap technology help me make...
25 Feb 2023 by Pete O'Hanlon
How to use arrays to manage multiple items
31 Oct 2022 by Member 10252017
Model: public class ClientSetupDto { public byte Status { get; set; } = 0; public string ClientName { get; set; } public string ClientId { get; set; } } API Request: [HttpPost] ...
31 Aug 2022 by Will Sewell
My solution that seems to work is this: if (ReturnValue) { if (DataToCheck.BoxQuantity == 0) // If the cell in the .CSV is blank it defaults the value to 0 { ...
31 Aug 2022 by Will Sewell
I have some code that imports rows from a .CSV file into my program. I have a validation method that checks whether a model has had data imported into it correctly: private bool ValidData(SupplierOrderImportModel DataToCheck) { ...
17 Feb 2022 by Pete O'Hanlon
What is an array and how to use it to manage multiple items
29 Nov 2021 by Uladzislau Baryshchyk
This series of articles consists of three articles, in which I will demonstrate step by step how to create a .NET core MVC project
17 Nov 2021 by Member 15435322
This is my swagger configuration class: package com.example.ecourtcustinfolast.config; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import...
5 Nov 2021 by #realJSOP
One way to allow access to multiple model entities within a ASP.NET MVC view.
17 Oct 2021 by Member 14335464
In a WPF scene, I have 2 Model3D in a GroupModel3D: one Model3D is a tool, the other is a workpiece and I want to test when they touch. To test when they touch, I need to inspect every coordinate of Model 1 to determine if they intersect the...
8 Apr 2021 by Robert Woodard
So I have a very complex stored procedure that returns a pivot table of data. This data is dynamic. Column names will change and the amount of columns can change. Based of the number of chart audits that were audited for a particular...
8 Apr 2021 by Richard Deeming
Even if you're using Entity Framework, you can still get access to the underlying connection to execute raw SQL commands. For example: var dt = new DataTable(); using (var command = context.Database.GetDbConnection().CreateCommand()) { ...
7 Apr 2021 by John Song 2021
Hello everyone! So, basically how can you make all the model instances updated on a daily basis in Django? Right now, I have a model that has each of my students' information. I want to update each of my students information everyday, so that the...
6 Apr 2021 by Muhammad Din Khairul Izman
hello I am trying to create a website that saves the name and time when a person clocks in to a database, but the time that was stored is off by 8 hours. Here is the code: from django.db import models from datetime import datetime, date ...
19 Jan 2021 by YawerIqbal
How Fiddler for model driven apps works and getting started
19 Jan 2021 by rtksmithjoton123
TryValidateModel can only justify whether it is valided successfully, but it can not give the error message. How can do it. What I have tried: I test the TryValidateModel , and find some document, but no this method to realize getting the...
19 Jan 2021 by Sandeep Mewara
You need to use ValidationSummary to get details of the error. An example: Validate Model Programmatically in ASP.NET MVC | BinaryIntellect Knowledge Base[^] Read more here: ValidationSummary in ASP.NET MVC[^] ValidationSummary Class...
27 Sep 2020 by YawerIqbal
A couple of questions answered about binding CDS data using Knockout and a few more tips shared
12 Aug 2020 by Bullgill Coder
Hi I am trying to get the address values from a simple post request to an API so I can read them an populate a SQL table. Items such as name etc I am able to read and write to the database, but each person has 2 addresses so these are in the json...
12 Aug 2020 by F-ES Sitecore
You treat properties in json that are other objects as properties in your c# classes that are classes that match the property's values. So in your case have an Address class that has the fields for the addresses and add a shipping_address and...
11 Aug 2020 by Garth J Lancaster
not sure what you mean by Quote: so these are in the JSON as an array (without square brackets). .. it's either proper JSON or not, else thump the person who owns the API and tell them to sharpen up !! (It's really hard to work with bastardised...
31 Jul 2020 by Sandeep Mewara
A3D is Alternativa Player 3D Export File - is created by AlternativaPlayer, an online 3D models viewer; contains a 3D model exported from the online program Refer: .A3D File Extension - How do I open it?[^]
31 Jul 2020 by charal
The files .a3d are for modeling and I do not know how to create them. What I have tried: I found that an A3D file created in Maya and translated from a Collada file. Nothing else.
26 Jun 2020 by Member 14779968
I am trying to validate if the APIs contains the same property and value of the model that its being compared to. I have a Validate method which where I am deserializing the response from the server. I also have the DTO which the model. Then...
26 Jun 2020 by #realJSOP
attemping to deserialize Jason to a model object will throw an exception if thedesrialization can’t be performed. Why can’t you just put a try/catch block around the deserialization code and let nature take its course?
26 Jun 2020 by Richard MacCutchan
Well of course you didn't find the source code. This is an exercise for you to show how much of your teacher's words you have understood. So go back to your lecture notes and start from the beginning. Looking at your question above the first...
26 Jun 2020 by Member 14874167
I have RDF model that has : --the following Classes : -Person. -Woman(subclass of person). -Man(subclass of person). -Child(subclass of person). -Son(subclass of child). -Daughter(subclass of child). --the object properties are :...
21 Jun 2020 by Leif Simon Goodwin
WPF docking window manager library
13 May 2020 by talbot
I temporarily solved it in controller GET method this way: parameterName = Request.Query["parameterName"].FirstOrDefault() as string; if (parameterName == string.Empty) parameterName = null;
13 May 2020 by User 10985167
i have the folowing model public class Store{ public string StoreName {get; set;} public string Price {get;set;} public string PriceSeparator {get; set;} public string Currency {get;set;}}var storeModel = new Store();storeModel gets populated from a wpf window...
17 Apr 2020 by Member 14088544
Hello Guys, I am facing some problem to creating the dynamic lists of list by using django models. subjects = ['M', 'E', 'B', 'C', 'CS', 'G', 'P', 'S', 'H', 'F'] neighbors = {} neighbors['M'] = ['E', 'B', 'C', 'CS', 'G'] neighbors['E'] = ['M',...
13 Apr 2020 by Manisha Tambade
mvc model returning Subject Test- (' 1) for input textbox- Subject Test- ('1) when im attaching model field to textbox in one of the function. any idea to fix it. What I have tried: @Html.Raw(HttpUtility.HtmlDecode(@Model.property)); and ...
13 Apr 2020 by Bohdan Stupak
You've confused it with System.Web.HttpUtility.HtmlEncode which will escape single quote.
12 Apr 2020 by Member 14088544
Sir, I am trying to make students and courses relationship but cannot do that Thats the Students Model: class Student(models.Model): GENDER = ( ('F', 'Female'), ('M', 'Male'), ('O', 'Other'), ) std_ID =...
28 Jan 2020 by F-ES Sitecore
I'm amazed you found no useful information about how to deserilise JSON, there are lots of articles. public class OrderChange { public long item1 { get; set; } public long[] item2 { get; set; } } public class Test { public long TEstId { get; set; } public...
28 Jan 2020 by Member 14103699
Hi All, I have a class like below class Test { public long TEstId{ get; set; } public IEnumerable OrderChanges { get; set; } } When am passing the data as below to above model, ienumberable property returns null { ...
28 Jan 2020 by OriginalGriff
C# supports Tuples, but ... JSON doesn't have a tuple indicator, so it "does the best it can" and generates a type that isn't a tuple. If I correct the JSON (by removing the space from the name "OrderChanges ") and run it through a JSON class generator[^] you get this: public class OrderChange...
14 Nov 2019 by Richard Deeming
Make sure you have a navigation property[^] set up on your UserRole entity. Then you simply need to Include the role, and use the navigation property to display the name. Entity: public class UserRole { public int UserId { get; set; } public User User { get; set; } public int...
14 Nov 2019 by Malikdanish
I have two tables user and role now while saving UserWithRole I am saving userid,roleId and date, Now on index view i want to show role name rather than role id but in UserwithRole table i am saving Role Id , but role Name is available in another Roles tables so how can i show the role name on...
17 Oct 2019 by F-ES Sitecore
Have a model that only implements the 4 fields needed for the second view, then create a model that inherits from that model and has the other fields for the first view. Then it is just a matter of passing the right model to the right view. class SmallView { // common four properties } ...
17 Oct 2019 by Malikdanish
I have two views and both need to be strongly type my model class is having 8 columns in total and my first view needed all these ten fields so i put Required validator on all fields , but on another view i just need the first 4 fields and the rest i do not know , so now I am using the same...
22 Aug 2019 by Member 14164795
How do I clear the bind on these properties so that changes I'm trying to make in an onpost method pull through? I have 6 bound properties in a ShipmentModel: [BindProperty(SupportsGet = true)] public ShipmentModel Shipment { get; set; } public class ShipmentModel { public string...
22 Aug 2019 by Member 14164795
This worked for me: Shipment.CurrentShipDt1 = null; Shipment.CurrentShipQty1 = 0; Shipment.CurrentShipDt2 = null; Shipment.CurrentShipQty2 = 0; Shipment.CurrentShipDt3 = null; Shipment.CurrentShipQty3 = 0; Shipment.CurrentShipDt4 = null; Shipment.CurrentShipQty4 = 0;...
22 Aug 2019 by jimmson
You need to pass property name to ModelState.Remove method, not the value. Either pass the property name in string, eg. ModelState.Remove("CurrentShipDt1"); or in the newer .NET framework, you can use nameof() keyword, eg. ModelState.Remove(nameof(Shipment.CurrentShipDt1));
3 Dec 2018 by Richard MacCutchan
How is it you could not find Concise Promela Reference[^]? Both (and all other statements) are clearly explained.
3 Dec 2018 by Member 14075527
Let's say I have this piece of PROMELA code active proctype A(){ do :: !x -> break :: else -> skip od … //more code } What exactly does break and skip do in this instance? Does break break out the whole process A() so that "more code" wouldn't be reached or just the...
3 Dec 2018 by Patrice T
Quote: What exactly is the difference between skip and break in PROMELA? This is probably not the best place to ask. Why don't you ask the makers ? Why don't you read documentation ? Why don't you ask in a users forum ? Why don't you try to use debugger to see what ir going on ?
29 Nov 2018 by Ehsan.MA
Consider rigid body
27 Nov 2018 by Vincent Maverick Durano
The error typically means that your Model doesn't meet the requirements to be validated. In your example, your FirstName, LastName, Email, Subject and Message properties are decorated with the [Required] attribute. This means that those values shouldn't be null and empty otherwise your condition...
27 Nov 2018 by Member 14063936
Model is not valid and I cannot figure out why. Model is below:using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace PTPA.Models { public class ContactUs { [Required] ...
22 Nov 2018 by Sk Imad
Use your HTMl form inside this BeginForm. @using (Html.BeginForm("MethodName", "ControllerName", FormMethod.Post)) { }
30 Jul 2018 by User 13897807
Testing! New to this site and want to see how it works! What I have tried: Giving this a try!
29 Jul 2018 by OriginalGriff
Quote: I have just done a lot of typing and backspacing, inputting a bunch of different things to try to make it work. And there is your problem. Stop typing. No, seriously - stop typing. Start thinking instead. Look at the rules, and work out what they require you to do when you play. Then get...
21 May 2018 by Vincent Maverick Durano
You can wrap your LoginViewModel and RegisterViewModel models in single model. This means that you will create a new class that holds your existing models so you could reference the new class in your View instead. For example: public class MemberModel{ public LoginViewModel LoginModel {...
21 May 2018 by Member 13834983
I need to do a login ,register page in ASP.NET MVC within one view. But application need to have 2 separate model class for login and register actions please check below code. View @using PAMWebApp.Models; @model Tuple @using (Html.BeginForm("Login", "Home",...
21 Apr 2018 by NitinShrivastava
In this article, we will try to understand Data Binding in AngularJS
1 Apr 2018 by #realJSOP
Find a hex editor, open the file with it, and see if you can determine how it's laid out.Chances are few if any of us play the game, so we don't have an example of the file to do it for you.
1 Apr 2018 by Member 13755707
I need to know how to make a model viewer program that can view files from the fear game like the Model00p There is no tools out there that I can find is there a api that I can use to make a program like this thanks in advance What I have tried: I have tried the fear public tools and they can...
15 Dec 2017 by Jakub Provaznik
Hi I am working on my own application. I set the the basic crud and when I want to create new item in database through my create form, everything goes well. Problem is when I intentionally miss something and expecting error messages. Then I have an excetion: Quote: The ViewData item that has...
26 Oct 2017 by nrpklpr
I am binding one partial view (among 3 views) to the main view. Main view having model tightly bind with it. Which partial view is going bind is decided at get method of controller according to the conditions. Either it bind one of three view or bind none. From controller I am returning main...
25 May 2017 by nmeri17
I've been using this middleware for sometime, then suddenly it stops working. var body = req.body; new ordersModel (body).save(function(err, newOrder, rowCount) { if (err) throw err; console.log(rowCount) // logs 1 updateEstimatedTime(newOrder); /* this function runs but inside it,...
18 May 2017 by Khademul Basher
How to create a set of data models from a set of database tables.
23 Apr 2017 by Khubaib Khawar
I have the problem statement to make an Object Model for. Problem Statement: Every vehicle has an engine and a gearbox. A gearbox is composed of pulleys working according to predefined gear ratios. Cars have smaller engines with 4-6 gears while Sports Utility Vehicles (SUVs) have bigger engines...
23 Apr 2017 by KarstenK
My first advice is that you read and watch some tutorials about UML to understand that stuff. Your will have to talk or write about your solution The second is, that you use some pencil and paper and draw these relations. Hints: - a car has one gear box - a gearbox consists of some gears...
8 Mar 2017 by Dave Clemmer
Considering the various qualities that a model oriented programming language should have for effective model oriented development.
1 Mar 2017 by Dave Clemmer
Exploring ways to make direct use of model structures and data to powerfully augment software development with a model oriented approach.
19 Feb 2017 by Dave Clemmer
Identifying some model oriented techniques you already use and put those techniques into context of overall model oriented techniques that you can tap into.
4 Feb 2017 by nik varma
Hi Guys,How can i apply a filter on "IEnumerable"? "GetTaskAllocatedOnFilter" property list any value can be null basis on that i need a dataPlease help, also let know if you guys want any other information to proved me solution on thisWhat I have tried:public class...
4 Feb 2017 by Thomas Daniels
You can use the .Where extension method: Enumerable.Where(TSource) Method (IEnumerable(TSource), Func(TSource, Boolean)) (System.Linq)[^]:using System.Linq;// Example: IEnumerable old = new int[] { 0, 1, 2, 3 };IEnumerable _new = old.Where(x => x != 0);In the above...
27 Jan 2017 by Francesco Bigi
Hello People, I have this issue:I want to put the marital status on drop down list, when I make the register of the new user, and chose married or unmarried, and click on the save button, on my db i see that it received the id (1, 2) instead of "married" or "unmarried".This is what I see...
27 Jan 2017 by Francesco Bigi
Many thanks to F-ES Sitecore for your help!Actually what I have done is this:// // POST: /Account/Register [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task Register(RegisterViewModel model) { ...
26 Jan 2017 by F-ES Sitecore
That's how dropdowns work, there are two elements, the name and the value. The name is what appears in the list and the value is what is submitted with the form. Normally you'd convert the ID back to the relevant text when needed. However if you really do only want the text and you don't care...
12 Dec 2016 by Webber Chiang
I am not very familiar to SQLThe following infomration are from my special homework. I come here to ask some hints about SQL language***The integrity rules are as following:1.Each employee may be managed by one other employee2.Each employee may manage one or more other...
3 Oct 2016 by Saineshwar Bageri
In this article, we are going learn to create an application that works online and offline.
26 Aug 2016 by Igor Krein
C# Extensions API for Entity Framework intended to simplify usage of drop-down lists, comboboxes and alike
7 Aug 2016 by MohamedKamalPharm, Omneya Hassanain, Nouran Yasser, Fatma Abdelhameed
Simulation Model to plan the capacity of an oncology Hospital with limited number of beds. The R script is run on R Studio or called from PHP.
6 Aug 2016 by Member 4594688
I found a solution that seems more flexible architecturally than app session, and since the data may change it will update the data when the forms are reloaded.Upon reflection I realized that I'm not so much concerned about fetching the data only once in the session (and it may change in the...
6 Aug 2016 by Member 4594688
I'm making a "News" sidebar that should persist on the website, through all other views, with data fetched from the database into the ViewBag.How should I architect the site to persist a partial view (or section...) that references the same data across all pages? The separation of...
2 Aug 2016 by Member 12618369
I am developing website for website for E-learning and I am looking for the model for that as there is no client for it what about prototype and star life cycleWhat I have tried:I thought of prototype and waterfall model
28 Jul 2016 by Member 10212775
Dear Members, I am doing project in mvc. I have my forms in bootstrap model for saving and i need to show a message,if i typed anything on any input box and click on close."Data Not Saved. Are you Sure you want to leave the form with out saving the data" i need to show a confirmation...
12 May 2016 by Deepak Kanswal Sharma
I'm New to MVC Application . My problem is while I'm trying to connect to Sql Server2008 . This is giving me the error :- Cannot open database "rsbenggmvc.Models.RsbEnggContext" requested by the login. The login failed.Login failed for user 'DEEPAK-PC\DEEPAK'.Project Name :-...
12 May 2016 by Dave Kreskowiak
There's really nothing to help with. It comes down to you reading up on SQL Server security and understanding how it works and how to set it up. There is no way you're going to have someone just give you a blurb in a forum post and it'll magically work.The error is pretty clear. The SQL...
14 Apr 2016 by _ProgProg_
Dears,I want to do some weird job which is: adding attributes dynamically to my model class without adding these attributes directly on each property in the model class.the whole story is:I have an MVC project using Code first with domain driven design so i have the following:Core...
14 Apr 2016 by johannesnestler
Sounds impossible - at least I can't think about a way to do it...Anyway some thoughts:What do you mean you can't add a reference to your core dll? But you crate a "hardcoded" reference (better dependency) to it anyway when reflecting, don't you?Why don't you use any of the "Standard...
10 Apr 2016 by Sergey Alexandrovich Kryukov
You are looking in wrong direction. All you described so far is reduced to the use of the class System.Dynamic.ExpandoObject. Consider this, for example:using System.Dynamic;//...dynamic myObject = new ExpandoObject();myObject.SomeProperty = "some string";myObject.SomeOtherProperty...
10 Apr 2016 by Mort Sjostrom
New to System.Dynamic namespace.I am attempting to create a class that, when instantiated, generates its own properties via string[] passed to its constructor. I'm not interested in assigning values at this point, nor generating methods/events. Only trying to understand how to create...
6 Apr 2016 by Member 11617113
I have two models. models/Resident.rb : has_many: leavesmodels/leave.rb: belongs_to: residentNow what I want to validate leave model attributes before they get created..leave.rb attributes : start_date,end_date,destinationhere is my leave model:class Leave
5 Mar 2016 by zonkerman2
I am working on an N-Layered design application using WinForms. My application has 4 layers identified as follows: Presentation Layer Application Layer Domain Layer Infrastructure Layer (Persistence with repositories) What are some recommended approaches to performing validations...
3 Mar 2016 by zcf-prince
Sorry,I don't know what's the significance for youI don't think the WCF will filter SpacesIf really as you sayeg:storeModel.PriceSeparator =storeModel.PriceSeparator .Replace(""," ");
3 Mar 2016 by Alaa Ben Fatma
You could use "\t", I think, to give you a tab character. That might make the spacing more clear.storeModel.PriceSeparator = @"\t";
3 Mar 2016 by NextGenDeveloper
This issue was introduce back with .NET 4.5, and there still hasn't been a clear fix; However you can try to workaround this by putting special whitespace characters.For example, try;storeModel.PriceSeperator = "\u2007";Or alternatively, as suggested by placing some kind of keyword...
31 Jan 2016 by Brady Kelly
I have `User` table in a PowerDesigner logical model, which inherits from a base entity that has `Id` as 'int`. I need to change this to `string`. I can't change the base entity's id type, as only one table must change. So I would like to simply remove this table's parent inheritance, and let it...
12 Jan 2016 by Sergey Alexandrovich Kryukov
I think you mean "modal popup". Please see my recent article Modal Popup From Scratch[^].I tried to discuss several alternatives, including making of from scratch.—SA
12 Jan 2016 by Passion4Code
Hello,Please follow the below link. You can use Bootstrap modal here to display the image inside the Modal Pop up.jquery - Bootstrap open image in modal - Stack Overflow[^]Bootstrap Popup modal image - center vertical example code[^]Hope these help.Thanks