/// <summary> /// Calls the "usp_TaskGet" stored procedure using POCO objects /// </summary> /// <returns>A DTO filled with the results of the SELECT statement.</returns> public virtual TPocoOutputDto TaskGet <TPocoOutputDto>(IProcedureInputDto input) where TPocoOutputDto : IProcedureOutputDto <Result <TaskGetOutputDto> >, new() { var parameters = input.ToObjectArray(); var result = this.TaskGet((Int32?)parameters[0]); var outputValues = new List <object>(); input.SetFromOutputParameters(outputValues.ToArray()); var outputPoco = new TPocoOutputDto(); outputPoco.SetFromResult(result); return(outputPoco); }
/// <summary> /// Calls the "usp_TaskUpdate" stored procedure using POCO objects /// </summary> /// <returns>The number of rows affected.</returns> public virtual TPocoOutputDto TaskUpdate <TPocoOutputDto>(IProcedureInputDto input) where TPocoOutputDto : IProcedureOutputDto <int>, new() { var parameters = input.ToObjectArray(); var result = this.TaskUpdate((Int32?)parameters[0], (String)parameters[1], (String)parameters[2], (Int32?)parameters[3], (DateTime?)parameters[4], (String)parameters[5]); var outputValues = new List <object>(); input.SetFromOutputParameters(outputValues.ToArray()); var outputPoco = new TPocoOutputDto(); outputPoco.SetFromResult(result); return(outputPoco); }
/// <summary> /// Calls the "usp_TaskCreateMultiple" stored procedure using POCO objects /// </summary> /// <returns>An IEnumerable of id</returns> public virtual TPocoOutputDto TaskCreateMultiple <TPocoOutputDto>(IProcedureInputDto input) where TPocoOutputDto : IProcedureOutputDto <Result <IEnumerable <Int32> > >, new() { var parameters = input.ToObjectArray(); var result = this.TaskCreateMultiple((IEnumerable <ITableValuedParamRow>)parameters[0]); var outputValues = new List <object>(); input.SetFromOutputParameters(outputValues.ToArray()); var outputPoco = new TPocoOutputDto(); outputPoco.SetFromResult(result); return(outputPoco); }