Beginning Entity Framework Core 2.0 by Derek J. Rouleau

Beginning Entity Framework Core 2.0 by Derek J. Rouleau

Author:Derek J. Rouleau
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


Helper Classes

We start off by creating a new class file. From the menu bar, choose Project and then Add Class. A type of class should be selected. If not, click on it and change the name to BasicValidation.cs . Once it’s created it should open. Then all you need to do is make sure it looks like Listing 4-16.

using System;

using System.Collections.Generic;

using System.Text;

namespace ComputerInventory {

public class BasicValidation {

public static bool ValidateYorN(string entry) {

bool result = false;

if (entry.ToLower() == "y" || entry.ToLower() == "n") {

result = true;

}

return result;

}

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.