Hi,
I need to implement role based security in the application created using ASPNETBOILERPLATE. Can someone please help with step by step implementation where function based security is explained. As per the requirement a role is having multiple permissions.
Kind regards, Anil
My requirement is to read data from excel file (client side) and post the JSON to server which will create enteries in one of the DB table. Before creating records I need to validate data at server side. If I add validation attribute to DTO, the framework automatically validate the object and through errors while I need them to be formatted or represented in better way. How can I handle that.
Also, I was trying the rely on Entityframework validation which will give errors if something wrong is found so I am catching DBExceptions like below and want to return errors the way I want to:
catch (Exception e) { var exc = e as DbEntityValidationException; foreach (var eve in exc.EntityValidationErrors) { var message = string.Format("For member {0} validation {1}{2} found", member.UserName, exc.EntityValidationErrors.Count(), exc.EntityValidationErrors.Count()>1? "errors":"error"); foreach (var ve in eve.ValidationErrors) { message = message + ve.ErrorMessage; errors.Add(message); } } } } return errors;
but on the UI I dont get the error results though still get the system generated error message.
Can someone please help me with this?