Beispiel #1
0
        public static int PersonUpdate(this TestDataDB dataConnection, int?id, int?personId, string?firstName, string?middleName, string?lastName, char?gender)
        {
            var parameters = new []
            {
                new DataParameter("@id", id, DataType.Int32),
                new DataParameter("@PersonID", personId, DataType.Int32),
                new DataParameter("@FirstName", firstName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@MiddleName", middleName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@LastName", lastName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@Gender", gender, DataType.NText)
                {
                    Size = 1
                }
            };

            return(dataConnection.ExecuteProc("[Person_Update]", parameters));
        }
Beispiel #2
0
        public static IEnumerable <PersonSelectByKeyResult> PersonSelectByKey(this TestDataDB dataConnection, int?id)
        {
            var parameters = new []
            {
                new DataParameter("@id", id, DataType.Int32)
            };

            return(dataConnection.QueryProc <PersonSelectByKeyResult>("[Person_SelectByKey]", parameters));
        }
Beispiel #3
0
        public static int PersonDelete(this TestDataDB dataConnection, int?personId)
        {
            var parameters = new []
            {
                new DataParameter("@PersonID", personId, DataType.Int32)
            };

            return(dataConnection.ExecuteProc("[Person_Delete]", parameters));
        }
Beispiel #4
0
        public static IEnumerable <PersonSelectByNameResult> PersonSelectByName(this TestDataDB dataConnection, string?firstName, string?lastName)
        {
            var parameters = new []
            {
                new DataParameter("@firstName", firstName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@lastName", lastName, DataType.NText)
                {
                    Size = 50
                }
            };

            return(dataConnection.QueryProc <PersonSelectByNameResult>("[Person_SelectByName]", parameters));
        }
Beispiel #5
0
        public static int PersonInsert(this TestDataDB dataConnection, string?firstName, string?middleName, string?lastName, char?gender)
        {
            var parameters = new []
            {
                new DataParameter("@FirstName", firstName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@MiddleName", middleName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@LastName", lastName, DataType.NText)
                {
                    Size = 50
                },
                new DataParameter("@Gender", gender, DataType.NText)
                {
                    Size = 1
                }
            };

            return(dataConnection.ExecuteProc("[Person_Insert]", parameters));
        }
Beispiel #6
0
 public static int AddIssue792Record(this TestDataDB dataConnection)
 {
     return(dataConnection.ExecuteProc("[AddIssue792Record]"));
 }