Exemple #1
0
        public static string[] GetEntityListActions(string entityTypeName)
        {
            var types = System.Reflection.Assembly.GetExecutingAssembly().GetTypes().ToList();
            var type  = System.Reflection.Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(t => t.Name == entityTypeName);

            return(type == null
                ? new string[] { }
                : GenericEntityDescriptor.GetListActions(type));
        }
        public void GetProperties()
        {
            var customer = new Customer()
            {
                Id = 12, Lastname = "Skalas", Firstname = "Kostas"
            };
            var descriptor = GenericEntityDescriptor.FromEntity(customer);

            Assert.IsTrue(descriptor.HasFieldWithValue("Id", "12"));
            Assert.IsTrue(descriptor.HasFieldWithValue("Lastname", "Skalas"));
            Assert.IsTrue(descriptor.HasFieldWithValue("Firstname", "Kostas"));
        }
Exemple #3
0
 public GenericEntityDescriptor GetDescriptor() => GenericEntityDescriptor.FromEntity(this);