示例#1
0
        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);
        }
示例#2
0
        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);
        }