User Login

Please enter user name and password into following boxes!

If you are not registered yet, please click

Forget Password

If you forget your password, please click


  • Track Created and Modified Fields Automatically with Entity Framework Code First

    using System; using System.Data.Entity; using System.Data.Entity.Core.Objects; using System.Data.Entity.Infrastructure; using System.Data.Entity.ModelConfiguration.Conventions; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Web; using log4net; using TelifBandrolTutanak.Models; namespace TelifBandrolTutanak.DAL { public class BandrolContext : DbContext { private readonly ILog _logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public BandrolContext() : base("Ban...Continue Reading

    .NET Core DbContext Usage

    using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Localization; using VirtualPos.Models; namespace VirtualPos.Controllers { [Route("api/[controller]")] public class BankController : Controller { private readonly BankContext _context; private readonly IStringLocalizer<BankController> _localizer; public BankController(BankContext context, IStringLocalizer<BankController> localizer) { _context = context; _localizer = loca...Continue Reading

    .NET Core Web API Language Support

    [Route("api/[controller]")] public class HomeController : Controller { private readonly IStringLocalizer<HomeController> _localizer; public HomeController(IStringLocalizer<HomeController> localizer) { _localizer = localizer; } [HttpGet("index/{id}")] public IActionResult Index() { return new ObjectResult(_localizer["Hello"]); } } Add Resources folder then, add and Controllers.HomeController.en-EN....Continue Reading

    Create Excel File With HtmlTextWriter Class

    C# Codes private void ExportGridToExcel() { Response.Clear(); Response.Buffer = true; Response.ClearContent(); Response.ClearHeaders(); string fileName = "Devlet_Personel_Baskanligi_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"; StringWriter strwritter = new StringWriter(); HtmlTextWriter htmltextwrtter = new HtmlTextWriter(strwritter); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/ms-excel"; Response.ContentEncoding = System.Text.Encoding.Unicode;...Continue Reading

    How to get Images From Scanner in C# with Windows Image Acqusition(WIA) Library

    Getting images from Scanner in C#, we will use ShowTransfer() method of WIA.ICommonDialog class in Windows Image Acqusition(WIA) library Full Code WIA.ICommonDialog dialog = new WIA.CommonDialog(); WIA.Device device = dialog.ShowSelectDevice(WIA.WiaDeviceType.UnspecifiedDeviceType, true, false); var d = device.DeviceID; WIA.DeviceManager manager = new WIA.DeviceManager(); foreach (WIA.DeviceInfo info in manager.DeviceInfos) { if (info.DeviceID == d) { // connect to scanner device = WiaDeviceId.Connect(); break; }...Continue Reading

    WPF Create Custom Checkbox List With ListBox Element

    In order to use CheckBox ListBox in a WPF application, we should use custom ListBox list. There are three steps to accomplish this: 1. Create a class which will represent items of the ListBox. 2. Create a List object consisting of the custom item class defined in step 1. 3. Add ListBox.ItemTemplate into <ListBox> element to create CheckBox ListBox. 4. Create a custom MultiValueConverter if you want to initialize the CheckBox items to be selected or not. Step 1: Create Country class for ListBox items internal class Country { public strin...Continue Reading