This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CASE I: OBJECTS */ | |
// BEFORE | |
public ViewResult CreateProduct() { | |
// create a new Product object | |
Product myProduct = new Product(); | |
// set the property values | |
myProduct.ProductID = 100; | |
myProduct.Name = "Kayak"; | |
myProduct.Description = "A boat for one person"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace LanguageFeatures.Models { | |
public class Product { | |
public int ProductID { get; set; } | |
public string Name { get; set; } | |
public string Description { get; set; } | |
public decimal Price { get; set; } | |
public string Category { set; get; } | |
} | |
} |
NewerOlder