public static CoQuanInfo ToDataInfo(this CoQuan entity)
 {
     return(new CoQuanInfo
     {
         Id = entity.Id,
         Name = entity.Ten,
         NhomCoQuanId = entity.NhomCoQuanId,
     });
 }
 public static CoQuanResult ToDataResult(this CoQuan entity)
 {
     return(new CoQuanResult
     {
         Id = entity.Id,
         Ten = entity.Ten,
         MoTa = entity.MoTa,
         NhomCoQuanId = entity.NhomCoQuanId,
         NhomCoQuan = entity.NhomCoQuan.ToDataResult().ToDataInfo(),
         CreateDate = entity.CreateDate,
         CreatedBy = entity.CreatedBy,
         IsDeleted = entity.IsDeleted,
         LastUpdated = entity.LastUpdated,
         LastUpdatedBy = entity.LastUpdatedBy
     });
 }
 public static CoQuanResult ToIfNotNullDataResult(this CoQuan entity)
 {
     return(entity?.ToDataResult());
 }
 public static CoQuanInfo ToIfNotNullDataInfo(this CoQuan entity)
 {
     return(entity?.ToDataInfo());
 }