اشتراک‌ها
سری 5 قسمتی کار با GitHub توسط Visual Studio

Using source control (1 of 5) | Getting started with GitHub

Welcome to the Getting started with GitHub series, where you will learn how to share your code from within Visual Studio by using Git and GitHub. In this episode, Robert shows how to add a solution to source control. 

سری 5 قسمتی کار با GitHub توسط Visual Studio
نظرات مطالب
C# 6 - Null-conditional operators
یک نکته‌ی تکمیلی: بهبود Null Coalescing Assignment در C# 8.0
ساده سازی انتساب مقداری به یک متغیر، اگر نال باشد:
- روش انجام اینکار تا پیش از C# 8.0
if (variable == null)
{
   variable = expression; // C# 1..7
}
- در C# 8.0
variable ??= expression; // C# 8
اشتراک‌ها
شروع به کار با Visual Studio 2017

Ready to get started with Visual Studio 2017? This is your course! Join the experts and get the details, from installation to debugging, in this practical Visual Studio 2017 deep dive.

See how to download and install Visual Studio in standalone and networked environments, along with some of the configuration options, such as choosing your workloads (types of apps or services, languages, and platforms), customizing the installation, and installing language packs. Then, take a tour of the Visual Studio IDE, including all the basics you need to get started with your development projects. Finally, explore debugging in Visual Studio, and learn how to use its features to investigate problems in your code.

شروع به کار با Visual Studio 2017
اشتراک‌ها
انتشار SQL Server 2016 CTP 3.1

New In-Memory OLTP improvements in CTP3.1 include:

  • Unique indexes in memory-optimized tables, to complement the support for unique constraints that was released in CTP3
  • LOB data types varchar(max), nvarchar(max), and varbinary(max) in memory-optimized tables and natively compiled modules
  • Indexes with NULLable key columns in memory-optimized tables

Syntax inputdate AT TIME ZONE timezone.

  • Inputdate: An expression that can be resolved to a smalldatetime, datetime, datetime2, or datetimeoffset value.
  • Timezone: Name of the destination time zone in standard format as enumerated by Windows. Available time zones can be found by querying sys.time_zone_info.

SQL Server Analysis Services (SSAS) updates allow upgrading your existing models to 1200 compatibility level and a JSON editor for SSDT;

SQL Server PowerPivot and Reporting Services/Power View for SharePoint 2016 available now with CTP3.1!
انتشار SQL Server 2016 CTP 3.1
اشتراک‌ها
2.Visual Studio 2017 15.6 منتشر شد

These are the customer-reported issues addressed in this release:

Microsoft Security Advisories for .NET Core

CVE-2018-0875: Microsoft is aware of a security vulnerability in the public versions of .NET Core where a malicious file or web request could cause a denial of service (DoS) attack.

  • System administrators are advised to update their .NET Core runtimes to versions 1.0.10, 1.1.7 or 2.0.6. Developers are advised to update their .NET Core SDK to versions 1.1.8 or 2.1.101. 

حجم تقریبی بروزرسانی از نسخه 15.6.1 به 15.6.2 برابر 1.2GB می‌باشد

2.Visual Studio 2017 15.6 منتشر شد
مطالب
WCF Method Overloading
تشریح مسئله : چگونه متد‌های سرویس WCF را Overload کنیم.

نکته : آشنایی با مفاهیم اولیه WFC برای فهم بهتر مفاهیم الزامی است.

همانطور که می‌دانیم امکان Overload کردن متد‌ها در سرویس‌های WCF وجود ندارد. یعنی نمی‌توان 2 متد با نام و پارامتر‌های متفاوت داشت. به مثال زیر دقت کنید.
ابتدا یک Contract به صورت زیر تعریف کنید
 [ServiceContract]
    public interface ISampleService
    {
        [OperationContract]
        int Sum( int number1, int number2 );

        [OperationContract]
        float Sum( float number1, float number2 );
    }
در Contract بالا دو متد با یک نام ولی آرگومان‌های متفاوت داریم. حالا یک سرویس برای این Contract می‌نویسیم.
   public class SampleService : ISampleService
    {
        public int Sum( int number1, int number2 )
        {
            return number1 + number1;
        }

        public float Sum( float number1, float number2 )
        {
            return number1 + number1;
        }
    }
اگر پروژه را کامپایل کنید پروژه بدون هیچ گونه مشکلی کامپایل خواهد شد. ولی اگر قصد استفاده از این سرویس را داشته باشیم با خطا روبرو خواهیم شد. از روش AddServiceReference استفاده کنید و سرویس مورد نظر را سمت کلاینت اضافه کنید. با خطای زیر روبرو خواهید شد.
Cannot have two operations in the same contract with the same name, 
methods Sum and Sum in type Service.ISampleService violate this rule. 
You can change the name of one of the operations by changing the method name 
or by using the Name property of OperationContractAttribute.
در این خطا به صورت کامل روش حل این مسئله گفته شده است. برای حل این مسئله باید از خاصین Name در OperationContractAttribute استفاده کرد. Contract بالا را به صورت زیر تغییر دهید.
[ServiceContract]
    public interface ISampleService
    {
        [OperationContract( Name = "SumByIntNumbers" )]
        int Sum( int number1, int number2 );

        [OperationContract( Name = "SumByFloatNumbers" )]
        float Sum( float number1, float number2 );
    }
حال اگر سرویس مورد نظر را به پروژه سمت کلاینت اضافه کنیم دو متد با نام‌های SumByIntNumbers و SumByFloatNumbers خواهیم داشت. البته اگر از روش Self Hosted استفاده کنیم دقیقا دو متد با نام Sum خواهیم داشت و Overloading را سمت سرور و کلاینت خواهیم داشت ولی در روش IIS Hosting و استفاده از AddServiceReference  از خاصیت Name برای این کار استفاده میشود.

موفق باشید.
اشتراک‌ها
کار با فایل‌های اکسل در برنامه‌های ASP.NET Core توسط کتابخانه‌ی EPPlus.Core

This post shows how to import and export .xls or .xlsx (Excel files) in ASP.NET Core. And when thinking about dealing with excel with .NET, we always look for third-party libraries or component. And one of the most popular .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx) is EPPlus. However, at the time of writing this post, this library is not updated to support .NET Core. But there exists an unofficial version of this library EPPlus.Core which can do the job of import and export xlsx in ASP.NET Core. This works on Windows, Linux and Mac. 

کار با فایل‌های اکسل در برنامه‌های ASP.NET Core توسط کتابخانه‌ی EPPlus.Core
اشتراک‌ها
هر برنامه نویس یک خود آموخته است

 There are many ways to become a programmer beside getting a computer science degree. If you’re on that less conventional path, you may be wondering what you should do to catch up to people who do have a degree. How can you compete with someone who spent many years in a classwork learning about computers and programming? 

هر برنامه نویس یک خود آموخته است