Entity Framework vs LINQ to SQL

LINQ to SQL only supports 1 to 1 mapping of database tables, views, sprocs and functions available in Microsoft SQL Server. It’s a great API to use for quick data access construction to relatively well designed SQL Server databases. LINQ2SQL was first released with C# 3.0 and .Net Framework 3.5. LINQ to Entities (ADO.Net Entity … Read more

Print Pdf in C#

A very straight forward approach is to use an installed Adobe Reader or any other PDF viewer capable of printing: Another way is to use a third party component, e.g. PDFView4NET

How can I download a file with batch file without using any external tools?

The answers.All scripts should be saved with .bat/.cmd extensions and can be used directly as batch scripts. Certutuil (for some reasons in the newest win10 builds this is recognized as trojan thread ):certutil.exe -urlcache -split -f “https://download.sysinternals.com/files/PSTools.zip” pstools.zip for easiness a macro can be used: CertUtil command can be abused to download a file from internet.Available by default in … Read more

What is a method group in C#?

A method group is the name for a set of methods (that might be just one) – i.e. in theory the ToString method may have multiple overloads (plus any extension methods): ToString(), ToString(string format), etc – hence ToString by itself is a “method group”. It can usually convert a method group to a (typed) delegate by using overload resolution – but not to … Read more

How to open an Excel file in C#?

You need to have installed Microsoft Visual Studio Tools for Office (VSTO). VSTO can be selected in the Visual Studio installer under Workloads > Web & Cloud > Office/SharePoint Development. After that create a generic .NET project and add a reference to Microsoft.Office.Interop.Excel via ‘Add Reference… > Assemblies’ dialog. Missing.Value is a special reflection struct … Read more

Could not establish secure channel for SSL/TLS with authority ‘*’

Yes an Untrusted certificate can cause this. Look at the certificate path for the webservice by opening the websservice in a browser and use the browser tools to look at the certificate path. You may need to install one or more intermediate certificates onto the computer calling the webservice. In the browser you may see … Read more