nhibernate - How do I specify a property as required (NOT NULLABLE)? -


i trying hand @ nhibernate's built-in mapping code. i've got working now. problem how configure properties on objects required in database within convention? i'm guessing sort of attribute markup?

i know if mappings hand, can configure them required, how do conventions?

simply use nullable types, example in class,

public class foo {    public int bar { get; set; }    public int? baz { get; set; } } 

bar not nullable, while baz nullable in db when use mapping code.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -