public async Task AtadasTestNincsXKitol() { var dbb = new DbContextOptionsBuilder <RaktarContext>(); dbb.UseSqlServer(connstrin); RaktarContext rc = new RaktarContext(dbb.Options); HomeRepository hr = new HomeRepository(rc); var eszkoz = (await hr.GetXMitList()).First(); using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { var xx = await hr.Xmentes( eszkoz, null, null, DateTime.Now, 0, null); Assert.AreEqual(HomeRepository.nincsXKitol, xx); } }
public async Task AtadasTestMentes() { var dbb = new DbContextOptionsBuilder <RaktarContext>(); dbb.UseSqlServer(connstrin); RaktarContext rc = new RaktarContext(dbb.Options); HomeRepository hr = new HomeRepository(rc); var eszkoz = (await hr.GetXMitList()).First(); var kitol = (await hr.GetXKitolList(eszkoz.ID)).First(); var hova = (await hr.GetXHovaList(kitol.ID)).First(); var mennyiseg = kitol.Mennyiseg - 1; using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { var xx = await hr.Xmentes( eszkoz, kitol, hova, DateTime.Now, mennyiseg, null); Assert.AreEqual(HomeRepository.sikeresFelvetel, xx); } }
public AlkalmazottController(UserManager <Alkalmazott> userManager, SignInManager <Alkalmazott> signInManager, RaktarContext context, RoleManager <IdentityRole> roleManager) { userMgr = userManager; signInMgr = signInManager; roleMgr = roleManager; _context = context; }
public async Task TestMethod1() { var dbb = new DbContextOptionsBuilder <RaktarContext>(); dbb.UseSqlServer(connstrin); RaktarContext rc = new RaktarContext(dbb.Options); HomeRepository hr = new HomeRepository(rc); var xx = await hr.GetXMitList(); }
public async Task listBeszerzesTest() { var dbb = new DbContextOptionsBuilder <RaktarContext>(); dbb.UseSqlServer(connstrin); RaktarContext rc = new RaktarContext(dbb.Options); HomeRepository hr = new HomeRepository(rc); var xx = await hr.ListBeszerzesek(null, 100, 1); Assert.IsNotNull(xx); Assert.IsTrue(xx.Total > 0); Assert.IsTrue(xx.Data.Count() > 0); Assert.IsTrue(xx.Data[0].Mennyiseg > 0); }
public TermekTipusController(RaktarContext context) { _context = context; }
public RaktarsController(RaktarContext context) { _context = context; }
public TermeksController(RaktarContext context, UserManager <Alkalmazott> userManager) { _context = context; userMgr = userManager; }
public LogController(RaktarContext context) { _context = context; }