Share Complex Data Objects between Modules

Best practices, code snippets for common functionality, examples, and guidelines.
bberrabah
Posts: 24
Joined: Wed Dec 20, 2017 6:18 pm

Share Complex Data Objects between Modules

Post by bberrabah » Mon Jun 11, 2018 9:06 am

Hello;

I have a question about best practises ti share complex Data Objects between Two Modules

For example, assume that i have module_a and module_b. module_a create a list of SimpleUCDTO IList(<SimpleDTO>(see bellow), and module_b have to use it

Code: Select all

namespace CustomCode.DTO
{
	[Serializable]
	public class SimpleDTO
	{
		public SimpleDTO()
		{
		}
	
		public SimpleUCDTO(String Type, String Percent)
		{
			this.Type= Type;
			this.Percent= Percent;
		}
		
		public String Type{get; set;}

		public String Percent{get; set;}
	}
}
Best regards

bberrabah
Posts: 24
Joined: Wed Dec 20, 2017 6:18 pm

Re: Share Complex Data Objects between Modules

Post by bberrabah » Mon Jun 11, 2018 1:41 pm

Hi!

I think that this problem should be resolved by using a static Global Class that handle the necessary objects.

https://stackoverflow.com/questions/143 ... -variables

Best regards