Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerable<PropertyInfo> childrenProperties = entidade.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(model => model.PropertyType.Namespace == typeof(T).Namespace).ToArray();
- foreach (var propertie in decimalPropertiesModel)
- {
- var value = propertie.GetValue(entidade, null);
- if (value != null)
- {
- propertie.SetValue(entidade, decimal.Round((decimal)value, noCasasDecimais), null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement