public TechnicalSupportModel getByID(DateTime visitDate, string customerID, string createdBy)
        {
            Mapper.CreateMap<CRM_TechnicalSupport, TechnicalSupportModel>();
            objTecnicalSupport = new CRM_TechnicalSupportRepository();

            CRM_TechnicalSupport objEntity = objTecnicalSupport.GetSingle(v => v.VisitedDate == visitDate && v.CustomerID == customerID && v.CreatedBy == createdBy);

            TechnicalSupportModel objResult = new TechnicalSupportModel();

            objResult = Mapper.Map(objEntity, objResult);

            return objResult;
        }
        public void Delete(TechnicalSupportModel entity)
        {
            objTecnicalSupport = new CRM_TechnicalSupportRepository();

            if (objTecnicalSupport.GetAll(v => v.VisitedDate == entity.VisitedDate && v.CustomerID == entity.CustomerID
                && v.CreatedBy == entity.CreatedBy).Count() > 0)
            {
                CRM_TechnicalSupport deleteRecord = objTecnicalSupport.GetSingle(v => v.VisitedDate == entity.VisitedDate && v.CustomerID == entity.CustomerID
                && v.CreatedBy == entity.CreatedBy);

                objTecnicalSupport.Delete(deleteRecord);
            }
        }
        public void Update(TechnicalSupportModel entity)
        {
            objTecnicalSupport = new CRM_TechnicalSupportRepository();

            Mapper.CreateMap<TechnicalSupportModel, CRM_TechnicalSupport>();

            if (objTecnicalSupport.GetAll(v => v.VisitedDate == entity.VisitedDate && v.CustomerID == entity.CustomerID
                && v.CreatedBy == entity.CreatedBy).Count() > 0)
            {
                CRM_TechnicalSupport updateRecord = objTecnicalSupport.GetSingle(v => v.VisitedDate == entity.VisitedDate && v.CustomerID == entity.CustomerID
                && v.CreatedBy == entity.CreatedBy);

                updateRecord = Mapper.Map(entity, updateRecord);

                objTecnicalSupport.Update(updateRecord);
            }
        }