اشتراک‌ها
آموزش رایگان برنامه نویسی Full-Stack به زبان فارسی

C#.NET for non-engineers.

The first course of "A Sr. Developer Course" courses. which contains:
1- C# Fundamentals for non-engineers.
2- DataBase for non-engineers.
3- Asp.NET WebForm for Non-engineers.
4- Application Architecture for no-engineers.
5- ASP.NET MVC for non-engineers.
6- Angular for non-engineers.

This is a course for who knows noting about C# and development if you know nothing about Array, variable, loop, and conditions you are in the right place.
at the end of this course, we will create one small university registration console application together.

You will learn in this course:
C#.NET
.NET Framework
Methods
Recursive methods
C# Primitive Types/Complex Types
conditions
switch case
Arrays
if statement
switch
loops
Creating a method
ref, out
enums
OOP/Object-oriented programing
Generics
Error handling
problem-solving
working with files


level: beginners to upper intermediate 

آموزش رایگان برنامه نویسی Full-Stack به زبان فارسی
اشتراک‌ها
سری آموزش توسعه‌ی وب از تیم کروم

Learn web development
Explore our growing collection of courses on key web design and development subjects. An industry expert has written each course, helped by members of the Chrome team. Follow the modules sequentially, or dip into the topics you most want to learn about. 

سری آموزش توسعه‌ی وب از تیم کروم
اشتراک‌ها
Open XML SDK به عنوان یک پروژه Open Source عرضه شد

 Today Doug Mahugh, Senior Technical Evangelist for Microsoft Open Technologies Inc., announced the release of an Open XML SDK as an open source project through the MS Open Tech hub. Although the SDK has been available since 2007, this release includes full source code available under the Apache 2.0 license on GitHub, as well as the project will continue to grow under the stewardship of the .NET Foundation

Open XML SDK به عنوان یک پروژه Open Source عرضه شد
نظرات مطالب
پردازش‌های Async در Entity framework 6
با سپاس از مقاله شما
بنده در پروژه خود اکثر متدهایی که با سرویس‌ها در ارتباط هستند رو توسط یک متد در  BaseController اجرا میکنم که مدیریت خطا، ارسال نوتیفیکیشن در صورت نیاز و... راحتر صورت بگیره...
  [HttpPost]
        [AjaxOnly]
        public virtual async Task<ActionResult> GetParts([DataSourceRequest] DataSourceRequest request)
        {
            return await DoBaseOperationAsync(() =>
            {
                var result = _partService.GetParts.Where(p => p.IsActive).AsLookupItemModel(p => p.PartId, p => p.CodeName);

                var data = result.ToDataSourceResult(request);
                return Json(data);
            });
        }

که متد DoBaseOperationAsync موجود در Action فوق در BaseController بصورت زیر پیاده سازی شده است.
 protected async Task<ActionResult> DoBaseOperationAsync(Func<ActionResult> func, string title = null, string message = null, MessageType messageType = MessageType.Error)
        {
            try
            {           
                AsyncManager.OutstandingOperations.Increment();

                var cultureInfo = new CultureInfo(CultureHelper.GetCultureString());

                return func != null ? await Task.Factory.StartNew(() =>
                {
                    System.Web.HttpContext.Current = ControllerContext.HttpContext.ApplicationInstance.Context;

                    Thread.CurrentThread.CurrentUICulture = cultureInfo;
                    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cultureInfo.Name);

                    return func.Invoke();

                }) : null;

            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);

           // Some code for error handling
            }
        }

حال سوال من این است، اجرا بصورت کد فوق Async تقلبی است (سربار اضافی) یا خیر ؟
آیا میتوان آنرا بهینه کرد که از حالت تقلبی دربیاید ؟
باسپاس./
نظرات مطالب
طراحی و پیاده سازی زیرساختی برای مدیریت خطاهای حاصل از Business Rule Validationها در ServiceLayer
بنده قبلا در پروژه‌ها در بین لایه‌های Service و Presentation ، از لایه دیگری استفاده میکردم که الگویی به همین صورت داشت.
البته مواردی مثل متدهای OnFailure و OnBoth و اینگونه متدها خب جنبه سلیقه ای در پیاده سازی الگو داره.
ولی در کل ایجاد یک درخواست و پاسخ به اون، به صورت زیر میتونه باشه:
public class Request<T>
{
  public Request(T model)
  {
     Model = model.
  }
public T Model { get; } }
کلاس پاسخ:
public class Response
{
   public bool IsSuccess { get; set; }

   public MessageCollection Messages { get; set; } 
}

public class HttpResponse : Response
{
   public HttpStatusCode StatusCode { get; set; }
}
public class Response<T> : Response { public T Result { get; set; } }
public class HttpResponse<T> : HttpResponse { public T Result { get; set; } } 
این کلاس به ازای هر درخواست برای انجام کاری، مشخص میکنه موفق آمیز بود یا خیر، چه پیام هایی برای کاربر قابل نمایش هست، و در صورتیکه نتیجه ای برای نمایش داشت هم در مشخصه Result میتونست قرار بگیره. و همچنین برای اپلیکیشن‌های WebApi میتونه از HttpResponse به عنوان یک بسته پاسخ استفاده بشه که شامل موارد مورد نیاز به علاوه StatusCode برای بررسی و ارسال به سمت کلاینت هست.
این حالت کلی این الگو هست که میتونه موارد دیگه ای هم بسته به نیاز بهش اضافه بشه.
اشتراک‌ها
152 نکته‌ی Postgres SQL

152 psql Tips — This was originally 100 tips when we first included it, but this list of bite-sized tips for the tried and tested psql client continues to grow. If you have a psql session coming up any time soon, this is worth a browse. It’s also possible to load a single tip and hop through randomly if you prefer your tips snack-sized. 

152 نکته‌ی Postgres SQL
اشتراک‌ها
تفاوت querystring و routeValue

برای دریافت پارامترهای موجود در آدرس دو راه وجود دارد یکی از استفاده از RouteValues و  دیگری Querystring از کلاس Request که در این لینک به نحوه رفتار آنان پرداخته شده است.

تفاوت querystring و routeValue