c# - Calling from a controller to a manager which parameter choose -


I am making a method, in the manager (such as Reich Manager) that is being called by a controller ReqController < Zero LockTransDetail (IRO Description, Dataset Data, String Field, Ball Lock Yn) Public Zero LockTransDetail (IRO Description: Line, IDecorator Decorator, String Field, Name, Bool LockYN)

And it is implemented,

  Public Zero LockTransDetai L (Iro Descriptionline, Dataset Data, String FieldName, Bull Lock YN) {IDecorator Decorator = GetDecorator (Data); ......}   

Or the other option is in the controller:

  IDcorator decorator = GetDecorator (data);   

and then call the method,

  ReqControllerInstance.LockTransDetail (detailRow, Decorator, Field Name, Lock YN)   

So what is the better way to pass the parameter as a dataset or a de-decorator method?

Not entirely sure that I understand your question, but if I did, then you Asking whether it is better to call a monolithic method on the manager ( Manager.DoSomething ) for administrator or breaking it down into several steps ( manager.ConvertData , Manager.GetDecorator , and then Manager.DoSomethingWithDecorator ).

It will be what this step is but depending on the example you brought, I would probably choose the first option. The role of the controller is to make the workflow an arcstadt - it knows that the current operation needs to be transferred to the responsibility of the RequestManager . What this should not do is for the requestManager work. If you use a dataset, then you have standard data transfer objects, so what should you do to the manager. Any further processing should be done in the manager.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -