Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Another README update

  • Loading branch information...
commit 34a1aa2960b43c3bd3c0c9827e6d6b66beaf5083 1 parent 9d437e1
@subsonic subsonic authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 README.markdown
View
5 README.markdown
@@ -29,6 +29,7 @@ Let's say we have a table named "Products". You create a class like this:
}
You could also just instantiate it inline, as needed:
+
var tbl = new DynamicModel("northwind", tableName:"Products", primaryKeyField:"ProductID");
Or ignore the object hierarchy altogether:
@@ -172,8 +173,8 @@ One thing that's always needed when working with data is the ability to stop exe
public Productions():base("MyConnectionString","Productions","ID") {}
public override void Validate(dynamic item) {
ValidatesPresenceOf("Title");
- ValidatesNumericalityOf("Price");
- ValidateIsCurrency("Price");
+ ValidatesNumericalityOf(item.Price);
+ ValidateIsCurrency(item.Price);
if (item.Price <= 0)
Errors.Add("Price can't be negative");
}
Please sign in to comment.
Something went wrong with that request. Please try again.