ASP.NET

Showing posts with label DataAnnotations. Show all posts
Showing posts with label DataAnnotations. Show all posts

Monday, July 10, 2017

Focus การทำงานที่ Mode Edit

Post นี้จะมา Focus การทำงานที่ Mode Edit

ตัวอย่าง
หากต้องการแก้ไข Display Name สามารถกำหนดผ่านไฟล์ Models/Movie.cs

เช่น

 using System;  
 using System.ComponentModel.DataAnnotations;  
 using System.Data.Entity;  
 namespace MvcMovie.Models  
 {  
   public class Movie  
   {  
     public int ID { get; set; }  
     public string Title { get; set; }  
     [Display(Name = "Release Date")]  
      public string Genre { get; set; }  
     public decimal Price { get; set; }  
   }  
   public class MovieDBContext : DbContext  
   {  
     public DbSet<Movie> Movies { get; set; }  
   }  
 }  

เชื่อม SQL Server บน VMWare ผ่าน SQL Server Management Studio ที่เครื่อง Client

หากติดตั้ง SQL Server ต่างเครื่องคอมพิวเตอร์ที่เราต้องการ Develop จะต้อง Set ค่าเพิ่มเติมผ่าน SQL Server Configuration Server ด้วย เพราะไม...