public async Task AddTest(Tests test) { using (var Db = new InTouch_DBEntities()) { Db.Tests.Add(test); await Db.SaveChangesAsync(); } }
public async Task AddUser(Users user) { using (var Db = new InTouch_DBEntities()) { try { Db.Users.Add(user); await Db.SaveChangesAsync(); } catch (Exception ex) { throw ex; } } }