Sreekanth Reddy

Sreekanth Reddy

  • 353
  • 4.9k
  • 423.2k

Bind exclude and scaffold false in Asp.net MVC

Jan 25 2017 3:03 AM
What's the use of Bind(Exclude='propname') and scaffold(false) attributes in below class ?
 
 
[Bind(Exclude = "AlbumId")]
public class Album
{
[ScaffoldColumn(false)]
public int AlbumId { get; set; }
[DisplayName("Genre")]
public int GenreId { get; set; }
}
 
If scaffold(false) I know that that property won't be binded to view(basically we take for primary key).
Then what about  Bind(Exclude='propname') ?

Answers (1)