The differences between the two snippets of code have nothing to do with creating an entity. And, clearly, you haven't tried both of them yet because one of them shouldn't even compile. Take a little time to search for information about the actual differences between the two pieces of code that you have posted.