Ejemplo n.º 1
0
 public static Procedure GetEntityById(int? ID)
 {
     Procedure procedure = new Procedure("GetEntityById");
     procedure.AddParameter("ID", ParameterType.Int32, 0, ID);
     procedure.AddParameter("EntityCode", ParameterType.String, ParameterDirection.Output, null, 30);
     return procedure;
 }
 public StoredProcedure(string name)
 {
     Procedure = new Procedure(name);
 }
Ejemplo n.º 3
0
        public void GetTByProcedureThrowsUnableToCreateCommandException()
        {
            var provider = new IProvider();
            var procedure = new Procedure("TestProcedure");
            provider.CommandBuilder.Setup(c => c.CreateCommandFromProcedure(procedure)).Returns(default(Data.ICommand));

            try
            {
                var session = new DataSession(provider.Object);
                session.GetT<Customer>(procedure);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex is UnableToCreateCommandException);
            }
        }
Ejemplo n.º 4
0
        public void FinalizeProcedureParameters(Procedure procedure, ICommand command)
        {
            throw new NotImplementedException();

        }
Ejemplo n.º 5
0
 public static Procedure GetEntityByState(string State)
 {
     Procedure procedure = new Procedure("GetEntityByState");
     procedure.AddParameter("State", ParameterType.String, 30, State);
     return procedure;
 }
Ejemplo n.º 6
0
 public static Procedure GetEntityByEntityCode(string EntityCode)
 {
     Procedure procedure = new Procedure("GetEntityByEntityCode");
     procedure.AddParameter("EntityCode", ParameterType.String, 30, EntityCode);
     return procedure;
 }