private static DT.DataType ToDto(DA.DataType source) { if (source == null) { return(null); } return(new DT.DataType { Name = source.Name, TypeName = source.TypeName }); }
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); }
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; }
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; }
partial void DeleteDataType(DataType instance);
partial void UpdateDataType(DataType instance);
partial void InsertDataType(DataType instance);