public void PostClocking(Clocking clocking) { var timeClock = TimeClockRepository.GetByUserName(clocking.UserName); if (timeClock == null) timeClock = new TimeClock(clocking.UserName); timeClock.AddTime(clocking.Date); TimeClockRepository.Store(timeClock); }
public void Store(TimeClock timeClock) { Session.Store(timeClock); Session.SaveChanges(); }
protected bool Equals(TimeClock other) { return string.Equals(UserName, other.UserName) && Enumerable.SequenceEqual(CheckedTimes.OrderBy(x => x), other.CheckedTimes.OrderBy(x => x)); }