public void Update(AspNetUsersDTO item) { ApplicationUser ApplicationUser = AspNetUsersMapper.CreateAspNetUsers().Map(item); using (var uow = _uowfactory.CreateUnitOfWork()) { var repo = uow.GetRepo <ApplicationUser>(); repo.Update(ApplicationUser); uow.BeginTransaction(); uow.Commit(); } }
public AspNetUsersDTO Get(string id) { ApplicationUser ApplicationUser; using (var uow = _uowfactory.CreateUnitOfWork()) { var repo = uow.GetRepo <ApplicationUser>(); ApplicationUser = repo.Get(id); } AspNetUsersDTO dto = AspNetUsersMapper.CreateAspNetUsersDTO().Map(ApplicationUser); return(dto); }
public void Create(AspNetUsersDTO item) { ApplicationUser ApplicationUser; using (var uow = _uowfactory.CreateUnitOfWork()) { var repo = uow.GetRepo <ApplicationUser>(); ApplicationUser = AspNetUsersMapper.CreateAspNetUsers().Map(item); repo.Create(ApplicationUser); } }
public IEnumerable <AspNetUsersDTO> GetAll() { IEnumerable <ApplicationUser> categories; using (var uow = _uowfactory.CreateUnitOfWork()) { var repo = uow.GetRepo <ApplicationUser>(); categories = repo.GetAll(); } IEnumerable <AspNetUsersDTO> dtos = AspNetUsersMapper.CreateListAspNetUsersDTO().Map(categories).ToList(); return(dtos); }