When adding a new external content type you have to go into the CA and the Business Data Connectivity Service and then "Set Object Permissions" for each external contant type.
Is it possible to do this using C#?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
This should help you get started : http://msdn.microsoft.com/en-us/library/ff464426.aspx
BdcAccessControlList Class - This class contains a list of access control entries , specifying access rights for one or more trustees in the BDC service administration and runtime components.
You need to use the provided members , properties and methods by this class.