Exemplo n.º 1
0
 public static void ToEntity(DT.Resource source, DB.Resource target)
 {
     if ((source != null) && (target != null))
     {
         target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId; target.HbInterval = source.HbInterval; target.OwnerUserId = source.OwnerUserId;
     }
 }
Exemplo n.º 2
0
 public static DT.Resource ToDto(DB.Resource source)
 {
     if (source == null)
     {
         return(null);
     }
     return(new DT.Resource {
         Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId, HbInterval = source.HbInterval, OwnerUserId = source.OwnerUserId
     });
 }
Exemplo n.º 3
0
        public static DB.Resource ToEntity(DT.Resource source)
        {
            if (source == null)
            {
                return(null);
            }
            var entity = new DB.Resource(); ToEntity(source, entity);

            return(entity);
        }
Exemplo n.º 4
0
 public static DB.Resource ToEntity(DT.Resource source) {
   if (source == null) return null;
   var entity = new DB.Resource(); ToEntity(source, entity);
   return entity;
 }
 partial void UpdateResource(Resource instance);
 partial void DeleteResource(Resource instance);
 partial void InsertResource(Resource instance);
		private void detach_ChildResources(Resource entity)
		{
			this.SendPropertyChanging();
			entity.ParentResource = null;
		}
Exemplo n.º 9
0
 private void CollectParentResources(List<Resource> resources, Resource resource) {
   if (resource == null) return;
   resources.Add(resource);
   CollectParentResources(resources, resource.ParentResource);
 }
Exemplo n.º 10
0
 public static void ToEntity(DT.Resource source, Resource target) {
   if ((source != null) && (target != null)) {
     target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId;
   }
 }
Exemplo n.º 11
0
 public static DT.Resource ToDto(Resource source) {
   if (source == null) return null;
   return new DT.Resource { Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId };
 }