private static DT.DataType ToDto(DA.DataType source)
 {
     if (source == null)
     {
         return(null);
     }
     return(new DT.DataType {
         Name = source.Name, TypeName = source.TypeName
     });
 }
Esempio n. 2
0
        private static DA.DataType ToEntity(string dataTypeName, string dataTypeTypeName, DA.OKBDataContext okb)
        {
            if ((dataTypeName == null) || (dataTypeTypeName == null))
            {
                return(null);
            }
            var entity = okb.DataTypes.Where(x => (x.Name == dataTypeName) && (x.TypeName == dataTypeTypeName)).FirstOrDefault();

            if (entity == null)
            {
                entity = new DA.DataType()
                {
                    Id = 0, Name = dataTypeName, TypeName = dataTypeTypeName
                }
            }
            ;
            return(entity);
        }
        public static DA.DataType ToEntity(DT.DataType source, DA.OKBDataContext okb)
        {
            if (source == null)
            {
                return(null);
            }
            var entity = okb.DataTypes.FirstOrDefault(x => (x.Name == source.Name) && (x.TypeName == source.TypeName));

            if (entity == null)
            {
                entity = new DA.DataType()
                {
                    Id = 0, Name = source.Name, TypeName = source.TypeName
                }
            }
            ;
            return(entity);
        }
Esempio n. 4
0
 private static DA.DataType ToEntity(string dataTypeName, string dataTypeTypeName, DA.OKBDataContext okb) {
   if ((dataTypeName == null) || (dataTypeTypeName == null)) return null;
   var entity = okb.DataTypes.Where(x => (x.Name == dataTypeName) && (x.TypeName == dataTypeTypeName)).FirstOrDefault();
   if (entity == null)
     entity = new DA.DataType() { Id = 0, Name = dataTypeName, TypeName = dataTypeTypeName };
   return entity;
 }
Esempio n. 5
0
 private static DA.DataType ToEntity(DT.DataType source, DA.OKBDataContext okb) {
   if (source == null) return null;
   var entity = okb.DataTypes.Where(x => (x.Name == source.Name) && (x.TypeName == source.TypeName)).FirstOrDefault();
   if (entity == null)
     entity = new DA.DataType() { Id = 0, Name = source.Name, TypeName = source.TypeName };
   return entity;
 }
Esempio n. 6
0
 partial void DeleteDataType(DataType instance);
Esempio n. 7
0
 partial void UpdateDataType(DataType instance);
Esempio n. 8
0
 partial void InsertDataType(DataType instance);