Ejemplo n.º 1
0
        protected ColumnViewModel ToViewModel(TableColumnDetail column)
        {
            ColumnViewModel vm = new ColumnViewModel
            {
                Id            = column.Column.Id,
                Name          = column.Column.Name,
                Type          = column.Column.Type,
                IsDeleted     = column.Column.IsDeleted,
                TableColumnId = column.TableColumn.Id
            };

            return(vm);
        }
Ejemplo n.º 2
0
    public bool SaveTableColumnDetails(int tableid, string tablename, string columnname, string columndatatype, Guid userid)
    {
        TableColumnDetail tbcolumndetails = new TableColumnDetail();

        tbcolumndetails.ColumnDataType = columndatatype;
        tbcolumndetails.ColumnName     = columnname;
        tbcolumndetails.TableId        = tableid;
        tbcolumndetails.TableName      = tablename;
        tbcolumndetails.UserId         = userid;
        dbContext.TableColumnDetails.InsertOnSubmit(tbcolumndetails);
        try
        {
            dbContext.SubmitChanges();
            return(true);
        }
        catch
        {
            return(false);
        }
        return(false);
    }