public Task <models.Teacher> LoginAsync(models.Teacher v) { return(_database.Table <models.Teacher>() .Where ( e => e.username.Equals(v.username) && e.password.Equals(v.password) ).FirstOrDefaultAsync()); }
public Task <int> SaveAsync(models.Teacher v) { if (v.ID != 0) { return(_database.UpdateAsync(v)); } else { return(_database.InsertAsync(v)); } }
public Task <int> DeleteAsync(models.Teacher v) { return(_database.DeleteAsync(v)); }