everything remade from using entity framework to raw DbCommand