コード例 #1
0
        public int Add(User entity)
        {
            int affectedRows = this.connection.ExecuteScalar <int>(
                UserQuery.Add(),
                new
            {
                FirstName  = entity.FirstName,
                LastName   = entity.LastName,
                Email      = entity.Email,
                Bio        = entity.Bio,
                CreateDate = DateTime.Now,
                UserTypeId = entity.Type,
                IsActive   = entity.IsActive
            },
                this.transaction);

            return(affectedRows);
        }