Esempio n. 1
0
        public async Task <ActionResult> Create([Bind(Include = "RoleId,RoleName,Description,Deleted")] Role role)
        {
            if (ModelState.IsValid)
            {
                db.Roles.Add(role);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(role));
        }
Esempio n. 2
0
 public async Task <int> SaveAsync()
 {
     return(await _context.SaveChangesAsync()); //bu metot zaten integer dönüyor
 }
Esempio n. 3
0
 public async Task <int> SaveAsync()
 {
     return(await _context.SaveChangesAsync());
 }
Esempio n. 4
0
 public async ValueTask DisposeAsync()
 {
     await _context.SaveChangesAsync();
 }