added code to get data from db with the architecture.Working fine