Пример #1
0
        //Delete User
        public TransactionStatus DeleteUser(UserBo1 userBo)
        {
            var transactionStatus = new TransactionStatus();
            var user = BuiltUserDomain1(userBo);


            CemexDb con = new CemexDb();

            SqlConnection conn = con.GetConnection();

            conn.Open();
            SqlCommand cmd = new SqlCommand("dbo.Proc_DeleteUser", conn);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Id", Convert.ToInt32(userBo.Id));

            cmd.ExecuteNonQuery();
            return(transactionStatus);
        }
Пример #2
0
 private User1 BuiltUserDomain1(UserBo1 userBo)
 {
     return((User1) new User1().InjectFrom(userBo));
 }