add view logic
This commit is contained in:
@ -31,5 +31,6 @@ namespace WebApplication1.Models
|
||||
public virtual DbSet<ticket> tickets { get; set; }
|
||||
public virtual DbSet<user> users { get; set; }
|
||||
public virtual DbSet<response> responses { get; set; }
|
||||
public virtual DbSet<viewlog> viewlogs { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,6 +69,15 @@
|
||||
<Property Name="displayname" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="role" Type="int" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="viewlog">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="ipadd" Type="nvarchar(max)" />
|
||||
<Property Name="newsid" Type="int" />
|
||||
<Property Name="viewdate" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="newswebappModelStoreContainer">
|
||||
<EntitySet Name="category" EntityType="Self.category" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="news" EntityType="Self.news" Schema="dbo" store:Type="Tables" />
|
||||
@ -76,6 +85,7 @@
|
||||
<EntitySet Name="tag" EntityType="Self.tag" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="ticket" EntityType="Self.ticket" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="user" EntityType="Self.user" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="viewlog" EntityType="Self.viewlog" Schema="dbo" store:Type="Tables" />
|
||||
</EntityContainer>
|
||||
</Schema></edmx:StorageModels>
|
||||
<!-- CSDL content -->
|
||||
@ -88,6 +98,7 @@
|
||||
<EntitySet Name="tickets" EntityType="newswebappModel.ticket" />
|
||||
<EntitySet Name="users" EntityType="newswebappModel.user" />
|
||||
<EntitySet Name="responses" EntityType="newswebappModel.response" />
|
||||
<EntitySet Name="viewlogs" EntityType="newswebappModel.viewlog" />
|
||||
</EntityContainer>
|
||||
<EntityType Name="category">
|
||||
<Key>
|
||||
@ -153,6 +164,15 @@
|
||||
<Property Name="adminid" Type="Int32" />
|
||||
<Property Name="ticketid" Type="Int32" />
|
||||
</EntityType>
|
||||
<EntityType Name="viewlog">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="ipadd" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="newsid" Type="Int32" />
|
||||
<Property Name="viewdate" Type="DateTime" Precision="3" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@ -229,6 +249,16 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="viewlogs">
|
||||
<EntityTypeMapping TypeName="newswebappModel.viewlog">
|
||||
<MappingFragment StoreEntitySet="viewlog">
|
||||
<ScalarProperty Name="viewdate" ColumnName="viewdate" />
|
||||
<ScalarProperty Name="newsid" ColumnName="newsid" />
|
||||
<ScalarProperty Name="ipadd" ColumnName="ipadd" />
|
||||
<ScalarProperty Name="ID" ColumnName="ID" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<EntityTypeShape EntityType="newswebappModel.ticket" Width="1.5" PointX="0.75" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="newswebappModel.user" Width="1.5" PointX="2.75" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="newswebappModel.response" Width="1.5" PointX="4.75" PointY="4.625" />
|
||||
<EntityTypeShape EntityType="newswebappModel.viewlog" Width="1.5" PointX="3.25" PointY="7.25" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
22
Models/viewlog.cs
Normal file
22
Models/viewlog.cs
Normal file
@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebApplication1.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class viewlog
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string ipadd { get; set; }
|
||||
public Nullable<int> newsid { get; set; }
|
||||
public Nullable<System.DateTime> viewdate { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user