Development

CSS Files and Bundling in ASP.Net WebForms

CSS File Bundling Basics To add custom CSS to an ASP.Net project, add the CSS files to /content and include them in a bundle in Bundle.config. A style bundle can [...]

2019-03-08T15:36:02-04:00March 8, 2019|

Add New Entity (or Copy Entity) with Entity Framework

To add a new entity to your model, simply add it using <context>.<models>.Add(newEntity) and then call <context>.SaveChanges(). If you want to copy an existing entity and insert the copied item [...]

2019-03-08T10:06:18-04:00March 8, 2019|

Relationships in Entity Framework 6

This demonstrates how to configure one-to-many and many-to-many relationships in a code-first Entity Framework ASP.Net MVC application. The sample application is a blog containing posts, post categories (one-to-many), and post [...]

2020-10-16T19:00:52-03:00February 22, 2019|

Bind Drop-Down List in MVC View in ASP.Net

In order for a drop-down list in an MVC View to be populated with data from the model, one method is to add the data to a model (or to [...]

2019-03-09T22:17:37-04:00February 21, 2019|

Checking if Object is of Type in C#

To check if an object is of a certain type in c#, simply use the is statement: if (myPerson is Person) { // Variable is of type Person }

2019-02-12T11:20:05-04:00February 12, 2019|
Go to Top