public string GenerateImagePath(int id, string guid, string storageRoot)
{
try
{
if (string.IsNullOrEmpty(storageRoot) || string.IsNullOrEmpty(guid))
{
throw new BlogException("Empty string in parameters. Provide non-empty strings.");
}
return storageRoot.TrimEnd('\\') + @"\" + id + @"\" + guid.TrimEnd('\\') + @"\";
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
}