You need to do some thinking - here are some things you may want to think about
Is it easier to read
if (a=b)
{
dostuff;
}
or
if (a=b)
{
dostuff;
}
What does it mean to DoSomething? Wuld a better name be "TrimCustomerName" or whatever it is meant to be doing?
When you are catching an exception , is it only going to throw an exception if the customer doesn't exist? what if the database is corrupt, or the network down etc.?
it's trying to trim the name to 25 characters - why? Some comments might help.
it's using the number 25 twice - which means of requirements change and it needs to be changed to 30, it needs to be changed in two places - how could you get around that so there is only one place to change it?
var is valid c# = in this case the x variable will be of the type returned by the GetPersonByID method, so it will be a Person, probably.
Speaking of which- x isn't a very meaningful name...
That should be enough to keep the teacher happy?