Skip to content

Instantly share code, notes, and snippets.

View serdarb's full-sized avatar
👀

Serdar Büyüktemiz serdarb

👀
  • Ankara
View GitHub Profile
namespace DogmaticWcf.Server.Contracts
{
[ServiceContract]
public interface IMyService
{
[OperationContract]
string DoSomething(MyDto data);
}
[DataContract]
public class Bootstrapper
{
public static IWindsorContainer Container { get; private set; }
public static void Initialize()
{
Container = new WindsorContainer();
Container.AddFacility<WcfFacility>();
@serdarb
serdarb / Alternative Gender enum
Created December 3, 2011 09:29
public sealed class Gender
public sealed class Gender
{
private readonly char _value;
public static readonly Gender Male = new Gender('M'); //Male
public static readonly Gender Female = new Gender('F'); //Female
public static readonly Gender Unisex = new Gender('U'); //Unisex
public static readonly Gender Other = new Gender('O'); //Other
private Gender(char v)
@serdarb
serdarb / eCommerceDatabaseProducts
Created October 29, 2011 17:22
Product Scenario In eCommerce Database
IF NOT EXISTS (SELECT * FROM [dbo].[ProductCategories] WHERE [Name] = 'Electronic')
INSERT INTO [dbo].[ProductCategories]
([ProductCategoryId],[ParentProductCategoryId],[Name],[LastUpdatedBy],[CreatedOn],[UpdatedOn])
VALUES (1, 0, 'Electronic', 1, GETDATE(), GETDATE())
GO
IF NOT EXISTS (SELECT * FROM [dbo].[ProductTypes] WHERE [Name] = 'Smart Phone')
INSERT INTO [dbo].[ProductTypes]
([ProductTypeId],[ProductCategoryId],[Name],[LastUpdatedBy],[CreatedOn],[UpdatedOn])
@serdarb
serdarb / gist:1244572
Created September 27, 2011 08:03
SpBrowserBlogPostCode
using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
using SpBrowser.Properties;
using System.Diagnostics;
using System.Drawing;
namespace SpBrowser
{
@serdarb
serdarb / countries-problem
Created September 23, 2011 22:10
Problem 2 - Countries
using System;
using System.Text.RegularExpressions;
namespace DirectoryProblem
{
class Program
{
static void Main(string[] args)
{
string T = Console.ReadLine().Trim();