Esempio n. 1
0
        public IEnumerable <Labour> GetLabourPayments(int siteId)
        {
            var entities = _labourRepo.Find(x => x.SiteId == siteId);
            var mapper   = new LaboursPaymentMapper();

            return(mapper.Map(entities.ToList()));
        }
Esempio n. 2
0
        public void AddLabourPayment(Labour labour)
        {
            var mapper = new LaboursPaymentMapper();
            var entity = mapper.Map(labour);

            _labourRepo.Add(entity);
            _labourRepo.Save();
        }
Esempio n. 3
0
        public void DeleteLabour(Labour labour)
        {
            var mapper         = new LaboursPaymentMapper();
            var entity         = mapper.Map(labour);
            var entityToDelete = _labourRepo.Get(entity.LabourId);

            _labourRepo.Delete(entityToDelete);
            _labourRepo.Save();
        }