コード例 #1
0
        static void Main(string[] args)
        {
            var prsconn = new PrsConnection("localhost", "PRS");

            prsconn.Connect();

            var user = new User()
            {
                Id         = 0,
                Username   = "******",
                Password   = "******",
                Firstname  = "zz",
                Lastname   = "zz",
                Phone      = "zz",
                Email      = "zz",
                IsAdmin    = true,
                IsReviewer = true,
            };
            var usersCtrl = new UsersController(prsconn); //passing prsconn to UsersController so we can use it
            //var recsAffected = usersCtrl.Insert(user);
            var users = usersCtrl.GetUsers();
            var user1 = usersCtrl.GetUser(7);

            user1.Firstname = "Noah";
            user1.Lastname  = "Phence";
            var recsAffected = usersCtrl.Update(user1);

            prsconn.Disconnect();
        }
コード例 #2
0
 public VendorsController(PrsConnection prsConnection)
 {
     this.prsConnection = prsConnection;
 }
コード例 #3
0
 public UsersController(PrsConnection prsConnection)
 {
     this.prsConnection = prsConnection;
 }