Skip to content

Instantly share code, notes, and snippets.

View fasetto's full-sized avatar
😈

Serkan Bircan fasetto

😈
View GitHub Profile
public class UnitOfWork
{
private readonly MongoDataContext _dataContext;
public UserRepository Users { get; private set; }
public UnitOfWork(MongoDataContext dataContext)
{
_dataContext = dataContext;
public virtual async Task<IEnumerable<TEntity>> GetByFieldAsync(string field, string value)
{
var filter = Builders<TEntity>.Filter.Eq(field, value);
var result = await Collection.Find(filter).ToListAsync();
return result;
}
public virtual async Task<TEntity> GetByIdAsync(ObjectId id)
{
[TestClass]
public class RepoTests
{
UnitOfWork unitOfWork = new UnitOfWork(new MongoDataContext("mongodb://localhost:27017/sampledb"));
[TestInitialize]
public async Task Initialize()
{
var serkan = new User()
{

Take Care Of Your Body

  • Exercise often
  • Eat Healthy & Stay hydrated
  • Stand up at least every hour
  • Get plently of sleep
  • Take care of your eyes

Take Care Of Your Mind

Branching strategies

  • master
  • dev
  • feature
  • next
  • iss53
  • iss53v2
  • hotfix
@fasetto
fasetto / csharp-news.md
Last active March 22, 2018 14:15
Whats new in C# ?

C# 6.0 News

  • static import
  • when (for filtering exceptions, type switch etc.)
  • nameof operator
  • Null conditional operator (?.)
  • string interpolation
  • Expression bodied function members ( func => ...dosomething)
  • Index initializers
  • await in catch-finally blocks
@fasetto
fasetto / git-deployment.md
Created February 2, 2018 08:56 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@fasetto
fasetto / index.html
Last active February 6, 2018 14:38
CSS Grid Sample
<div class="wrapper">
<!-- Navigation -->
<nav class="main-nav">
<ul>
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">About</a>
</li>
@fasetto
fasetto / normalize.scss
Last active April 15, 2018 17:02
Normalize CSS
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/