public static List <AuthFunction> ToEntity(this ObservableCollection <AuthFunctionMsg> msgList) { List <AuthFunction> entityList = new List <AuthFunction>(); if (msgList != null) { foreach (AuthFunctionMsg item in msgList) { AuthFunction entity = item.ToEntity(); entityList.Add(entity); } } return(entityList); }
public static AuthFunction ToEntity(this AuthFunctionMsg msg) { AuthFunction entity = null; if (msg != null) { entity = new AuthFunction() { Key = msg.Name, Name = msg.Name, ApplicationId = msg.ApplicationId }; } return(entity); }