We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

entity framework extension class and creating a custom class

Im using eneity framework and I would like to create a partail class which i have done.

Namespace CulminITIMSModel

Partial Public Class Role

Private _roleID As Integer = 0

Private _role As String = ""

<StringLengthValidator(1, 50, Ruleset:="RuleSetA", _

MessageTemplate:="First Name must be between 1 and 50 characters")> _


Public Property Role1() As String

Get

Return _role

End Get

Set(ByVal value As String)

_role = value

End Set

End Property


End Class

End Namespace


I want to enter a new record with possibly more than 50 characters for the name, when i run the program the system gives me an autogenerated error message and i want to know why it wont display my custom message.

Please help urgently!

1
Contributor
0
Replies
1
View
jesskuzlo
Newbie Poster
1 post since May 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0530 seconds using 2.68MB