Service Method,where I have to write business logic

Service Method,
1.Where I have to write business logic.
2.In that Business Logic,I have to connect database(Using Datamanager, LoadContext method did not connect)

private List<College> loadBookPublications(UUID college_id) {
        LoadContext<College> loadContext = LoadContext.create(College.class)
                .setQuery(LoadContext.createQuery("insert into collegedata_college (college_id,college_name) VALUES (?,?)")
                        .setParameter("college_id", 01).setParameter("college_name","ram"));
                //.setParameter("college_name", college_name)
                //.setView("college.full");
        return dataManager.loadList(loadContext);
    }

Hi,

On the middle tier, use EntityManager instead of DataManager.
Here’s the difference: https://doc.cuba-platform.com/manual-latest/dm_vs_em.html