public BlokService(UnitofWork uow) { _uow = uow; _blokRepository = _uow.GetRepository <blok>(); _bagimsizBolumRepository = _uow.GetRepository <bagimsiz_bolumler>(); _blokDTO = new EBlokDTO(); }
public MuhtelifIslemlerService(UnitofWork uow) { _uow = uow; _muhtelifIslemler = _uow.GetRepository <muhtelif_islemler>(); _bankaHareketRepository = _uow.GetRepository <banka_hareket>(); _kasaHareketRepository = _uow.GetRepository <kasa_hareket>(); }
public AnasayacService(UnitofWork uow) { _uow = uow; _anaSayacRepository = _uow.GetRepository <anasayac>(); _bagimsizSayacRepository = _uow.GetRepository <bagimsiz_bolum_sayaclari>(); _anaSayacDTO = new EAnasayacDTO(); }
public UserService(UnitofWork uow) { _uow = uow; _kisilerRepository = _uow.GetRepository <kisiler>(); _bagimsizKisiRepository = _uow.GetRepository <bagimsiz_bolum_kisiler>(); _userDTO = new EUserDTO(); }
internal ALogService(IUnitofWork uow) { _uow = uow; _personRepository = uow.GetRepository <Person>(); _exceptionLogRepository = uow.GetRepository <ExceptionLog>(); _requestLogRepository = uow.GetRepository <RequestLog>(); _tempRequestLogRepository = uow.GetRepository <TempRequestLog>(); }
public TipService(UnitofWork uow) { _uow = uow; _tiplerRepository = _uow.GetRepository <tipler>(); _kisilerRepository = _uow.GetRepository <kisiler>(); _hesapHareketRepository = _uow.GetRepository <hesap_hareket>(); _tipDTO = new ETiplerDTO(); }
internal APersonService(IUnitofWork uow) { _uow = uow; _taskRepository = uow.GetRepository <Task>(); _lookupRepository = uow.GetRepository <Lookup>(); _personRepository = uow.GetRepository <Person>(); _objectRawSql = uow.GetRawSql <object>(); }
public KisilerService(UnitofWork uow) { _uow = uow; _kisilerRepository = _uow.GetRepository <kisiler>(); _kisilerkDTO = new EKisiDTO(); _bagimsizBolumlerRepository = _uow.GetRepository <bagimsiz_bolumler>(); _bagimsizBolumKisilerRepository = _uow.GetRepository <bagimsiz_bolum_kisiler>(); _hesapHaraketRepository = _uow.GetRepository <hesap_hareket>(); }
public SubscriberService(UnitofWork uow) { _uow = uow; _aboneRepo = _uow.GetRepository <Abone>(); _aboneDTO = new AboneDTO(); _giriscikisRepo = _uow.GetRepository <AboneGiriCikis>(); _giriscikisDTO = new AboneGirisCikisDTO(); _odemeRepo = _uow.GetRepository <AboneOdeme>(); _odemeDTO = new AboneOdemeDTO(); }
public CarService(UnitofWork uow) { _uow = uow; _aracRepo = _uow.GetRepository <Arac>(); _markaRepo = _uow.GetRepository <AracMarka>(); _modelRepo = _uow.GetRepository <AracModel>(); _karaRepo = _uow.GetRepository <KaraListe>(); _aracDTO = new AracDTO(); _markaDTO = new AracMarkaDTO(); _modelDTO = new AracModelDTO(); _karaDTO = new KaraListeDTO(); }
public bool deleteEmployee(int employeeId) { try { var getEmployee = uow.GetRepository <Employee>().Get(z => z.Id == employeeId); uow.GetRepository <Employee>().Delete(getEmployee); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteTitle(int titleId) { try { var getTitle = uow.GetRepository <CompanyTitle>().Get(z => z.Id == titleId); uow.GetRepository <CompanyTitle>().Delete(getTitle); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deletePermit(int PermitId) { try { var getPermit = uow.GetRepository <EmployeePermit>().Get(z => z.Id == PermitId); uow.GetRepository <EmployeePermit>().Delete(getPermit); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteUser(int userId) { try { User getUser = uow.GetRepository <User>().Get(z => z.Id == userId); uow.GetRepository <User>().Delete(getUser); uow.SaveChanges(); return(true); } catch (System.Exception) { return(false); } }
public ApiBase(IServiceProvider service) { _logger = service.GetService <ILogger <TController> >(); _uow = service.GetService <IUnitofWork>(); _repository = _uow.GetRepository <T>(); _service = service; }
public RoleDTO GetById(int Id) { var getRole = uow.GetRepository <Role>() .Get(z => z.Id == Id); return(MapperFactory.CurrentMapper.Map <RoleDTO>(getRole)); }
public List <EmployeeDetailDTO> getEmployeeDetail(int companyId) { var emp = uow.GetRepository <Employee>().Get(z => z.CompanyID == companyId); var birtdate = emp.EmployeeDetail.BirthDate.ToList(); return(MapperFactory.CurrentMapper.Map <List <EmployeeDetailDTO> >(birtdate)); }
public WorkService(IUnitofWork uow) { _taskRepository = uow.GetRepository <Task>(); _taskMediaRepository = uow.GetRepository <TaskMedia>(); _taskHistoryRepository = uow.GetRepository <TaskHistory>(); _commentRepository = uow.GetRepository <Comment>(); _personRepository = uow.GetRepository <Person>(); _projectRepository = uow.GetRepository <Project>(); _lookupListRepository = uow.GetRepository <LookupList>(); _mediaRepository = uow.GetRepository <Media>(); _unitRepository = uow.GetRepository <Unit>(); _objectRawSql = uow.GetRawSql <object>(); }
public bool deleteCompanyBranch(int CompanyBranchId) { try { var getCompanyBranch = uow.GetRepository <CompanyBranch>().Get(z => z.Id == CompanyBranchId); uow.GetRepository <CompanyBranch>().Delete(getCompanyBranch); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteDebit(int Id) { try { var getDebit = uow.GetRepository <Debit>().Get(z => z.Id == Id); uow.GetRepository <Debit>().Delete(getDebit); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteContact(int contactId) { try { var delete = uow.GetRepository <Contact>().Get(z => z.Id == contactId); uow.GetRepository <Contact>().Delete(delete); uow.SaveChanges(); return(true); } catch (System.Exception) { return(false); } }
public bool deleteRole(int roleId) { try { Role getRole = uow.GetRepository <Role>().Get(z => z.Id == roleId); uow.GetRepository <Role>().Delete(getRole); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteCategory(int categoryId) { try { var delete = uow.GetRepository <Category>().Get(z => z.id == categoryId); uow.GetRepository <Category>().Delete(delete); uow.SaveChanges(); return(true); } catch (System.Exception) { return(false); } }
public bool deleteArticle(int articleId) { try { var article = uow.GetRepository <Article>().Get(z => z.Id == articleId); uow.GetRepository <Article>().Delete(article); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool deleteTag(int tagId) { try { var delete = uow.GetRepository <Tag>().Get(z => z.Id == tagId); uow.GetRepository <Tag>().Delete(delete); uow.SaveChanges(); return(true); } catch (System.Exception) { return(false); } }
/// <summary> /// Burada dependency injection'ı farklı şekilde kullanmaya karar verdim çünkü diğer projelerimde constructorlar içerisinde çok fazla parametre oluyor ve okunması zor hale geliyordu. /// IserviceProvider benim için dependency injection ile resolve işlemi görecek yani bağımlılığı service provider ile projeme enjekte edeceğim. /// </summary> /// <param name="service">bağımlılıkları eklemek için service provider kullanacağız</param> public ApiBase(IServiceProvider service) { //Get Service diyerek dependencylerimizi ınject ediyoruz _logger = service.GetService <ILogger <TController> >(); _uow = service.GetService <IUnitofWork>(); _repository = _uow.GetRepository <T>(); _service = service; _httpContextAccessor = service.GetService <IHttpContextAccessor>(); }
//private readonly IGenericRepository<muhtelif_islemler> _muhtelifIslemler; public MuhtelifController(IUnitofWork uow, IKasaService kasaService, IBankaService bankaService, IMuhtelifBasliklarService muhtelifBasliklarService, IMuhtelifIslemlerService muhtelifIslemlerService) : base(uow) { _uow = uow; _kasaService = kasaService; _bankaService = bankaService; _muhtelifBasliklarService = muhtelifBasliklarService; _muhtelifIslemlerService = muhtelifIslemlerService; _muhtelifBasliklar = _uow.GetRepository <muhtelif_baslikler>(); }
public Task RunAsync() { Demo demo = new Demo(); demo.DemoName = RandomString(15); _unitofwork.GetRepository <CronJob.Data.Entities.Demo>().Add(demo); _unitofwork.SaveChanges(true); _logger.LogError($"Second Job in DbContext !! :{DateTime.Now:yyyy-MM--dd HH:mm:ss}"); _logger.LogCritical($"Second Job :{DateTime.Now:yyyy-MM--dd HH:mm:ss}"); return(Task.CompletedTask); }
public IActionResult Index() { var a = _unitofwork.GetRepository <CronJob.Data.Entities.Demo>(); _logger.LogError("Index kibana"); //var model= _unitofwork.GetRepository<CronJob.Data.Entities.Demo>().GetAll(); var model = a.GetAll(); //var model =_context.Demos.ToList(); return(View(model)); //return Content("Jobs are running..."); }
public bool deleteBloodGroupDTO(int BloodGroupId) { try { var getBloodGroup = uow.GetRepository <BloodGroup>().Get(z => z.Id == BloodGroupId); uow.GetRepository <BloodGroup>().Delete(getBloodGroup); uow.SaveChanges(); return(true); } catch (Exception) { return(false); } }