Exemple #1
0
        private static void Create(string entityName)
        {
            string   nameParseResult         = TryParseProperty.TryParseStringProperty(Localize.PropertyName, entityName);
            int      completenessParseResult = TryParseProperty.TryParseIntProperty(Localize.PropertyCompleteness, entityName);
            DateTime createdOnParseResult    = TryParseProperty.TryParseDateTimeProperty(Localize.PropertyCreatedOn, entityName);
            Guid     typeIdParseResult       = TryParseProperty.TryParseGuidProperty(Localize.PropertyTypeId, entityName);

            Console.WriteLine(Localize.Creating + "...");
            try
            {
                CRUDOperations.CreateEntity(nameParseResult, completenessParseResult, createdOnParseResult, typeIdParseResult);
                Console.WriteLine(String.Format(Localize.Done, entityName, Localize.Created));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }