How to get size of blob (varbinary(max)) from SQL Server without getting the blob itself with Entity Framework in C#?
using (var context = new EntityBazaCRM(Settings.sqlDataConnectionDetailsCRM))
{
Settings.WybraneSzkolenie = context.Szkolenies.FirstOrDefault(d => d.SzkolenieID == szkolenieId);
}
In sql I would do it select Len(field) from table? Or the only way to do it is to actually store the value as another column? It doesn’t make sense to load blob’s to computer (especially on slow links) and then using Blob.Length.
Use SqlFunctions: