public IDBTableAdapterCommand <T> CreateInsertCommand(DBTableAdapterContext <T> context) { var cmd = new ReturningCommand <T>( _SqlResolver.InsertTemplate(context), context.AllColumnsInfo.Select(i => new CommandParameter <T> { Column = i, Direction = ParameterDirection.InputOutput }) ); return(cmd); }
public IDBTableAdapterCommand <T> CreateUpdateCommand(DBTableAdapterContext <T> context) { if (context.PkColumns.Count() == 0) { return(null); } var cmd = new ReturningCommand <T>( _SqlResolver.UpdateTemplate(context), context.AllColumnsInfo.Select(i => new CommandParameter <T> { Column = i, Direction = ParameterDirection.InputOutput }) ); return(cmd); }