/// <reference path="nova.all.js" />

var DemoDataContext = function () {
    nova.data.DbContext.call(this, "Demo", "1.0", "Demo DB", 1000000);

    this.users = new nova.data.Repository(this, User, "users");
    this.roles = new nova.data.Repository(this, Role, "roles");
};

DemoDataContext.prototype = new nova.data.DbContext();
DemoDataContext.constructor = DemoDataContext;

var User = function () {
    nova.data.Entity.call(this);
    this.name = "";
    this.password = "";
    this.birthYear = 1980;
    this.createdDate = new Date();
    this.deleted = false;
};
User.prototype = new nova.data.Entity();
User.constructor = User;

var Role = function () {
    nova.data.Entity.call(this);
    this.name = "";
    this.createdDate = new Date();
};
Role.prototype = new nova.data.Entity();
Role.constructor = Role;

Last edited Mar 19, 2013 at 2:30 PM by leo_2010, version 1

Comments

No comments yet.