예제 #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;
     }
 }
예제 #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
     });
 }
예제 #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);
        }
예제 #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;
		}
예제 #9
0
 private void CollectParentResources(List<Resource> resources, Resource resource) {
   if (resource == null) return;
   resources.Add(resource);
   CollectParentResources(resources, resource.ParentResource);
 }
예제 #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;
   }
 }
예제 #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 };
 }