Skip to content

Instantly share code, notes, and snippets.

View Kaushik1987's full-sized avatar

Kaushik Thanki Kaushik1987

View GitHub Profile
@Kaushik1987
Kaushik1987 / gist:ba609eaf5496df837c9ca2f52c1f549b
Created April 2, 2020 15:34
Previous implementation of getting month name.
private static getMonthName(month: number): string
{
if (month == null)
{
return 'XXX';
}
var date = new Date();
date.setMonth(month - 1); // The problem code.
return date.toLocaleString("en-us", { month: "short" });
@Kaushik1987
Kaushik1987 / UnitOfWork.cs
Created October 3, 2019 10:02 — forked from azborgonovo/UnitOfWork.cs
Creating the 'best' Unit of Work and Repository implementation on C#
// Basic unitOfWork pattern as described by Martin Fowler (http://martinfowler.com/eaaCatalog/unitOfWork.html)
// Other methos as 'registerNew' are going to be managed by each repository
public interface IUnitOfWork : IDisposable
{
void Commit();
Task CommitAsync();
void Rollback();
}
public interface IUnitOfWorkFactory