public void UpdateUser(UserModel user)
        {
            var entity = Db.Get<User>(user.Id);
            entity.UserName = user.UserName;

            Db.Save(entity);

            Response.RedirectToRoute("UserList");
        }
        public void InsertUser(UserModel user)
        {
            var entity = new Logic.Entities.User
            {
                UserName = user.UserName
            };

            Db.Save(entity);

            Response.RedirectToRoute("UserList");
        }
 public UserModel SelectUser([RouteData]Guid? id)
 {
     var user = new UserModel();
     if(id.HasValue) user.InjectFrom(Db.Get<User>(id.Value));
     return user;
 }