public static TapTinVanBanResult ToDataResult(this TapTinVanBan entity) { return(new TapTinVanBanResult { Id = entity.Id, VanBanId = entity.VanBanId, VanBanInfo = entity.VanBan.ToDataInfo(), Url = entity.Url, FileName = System.IO.Path.GetFileName(entity.Url), Path = System.IO.Path.GetDirectoryName(entity.Url), UserUploadId = entity.UserUploadId, UserInfo = entity.User.ToDataInfo(), CreateDate = entity.CreateDate, CreatedBy = entity.CreatedBy, IsDeleted = entity.IsDeleted, LastUpdated = entity.LastUpdated, LastUpdatedBy = entity.LastUpdatedBy }); }
public static TapTinVanBanResult ToIfNotNullDataResult(this TapTinVanBan entity) { return(entity?.ToDataResult()); }