whole project pushed

This commit is contained in:
2025-08-23 16:13:20 +03:30
parent 1cbde63229
commit 76a1e32e34
36 changed files with 1798 additions and 315 deletions

24
Models/Client.cs Normal file
View File

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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 boilerplate.Models
{
using System;
using System.Collections.Generic;
public partial class Client
{
public int Client_Id { get; set; }
public string Client_Name { get; set; }
public string Client_LastName { get; set; }
public string Client_PhoneNumber { get; set; }
public string Client_UserName { get; set; }
public string Client_Email { get; set; }
}
}

21
Models/Item.cs Normal file
View File

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <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 boilerplate.Models
{
using System;
using System.Collections.Generic;
public partial class Item
{
public int Item_Id { get; set; }
public string Item_Title { get; set; }
public string Item_Type { get; set; }
}
}

View File

@ -25,6 +25,9 @@ namespace boilerplate.Models
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<Client> Clients { get; set; }
public virtual DbSet<Item> Items { get; set; }
public virtual DbSet<News> News { get; set; }
public virtual DbSet<Setting> Settings { get; set; }
public virtual DbSet<User> Users { get; set; }
}

View File

@ -1,4 +1,4 @@
// T4 code generation is enabled for model 'D:\Users\l\source\repos\boilerplate\Models\Model1.edmx'.
// T4 code generation is enabled for model 'C:\Users\Senat\source\repos\boilerPlate - Test\new-boilerplate\Models\Model1.edmx'.
// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
// is open in the designer.

View File

@ -4,7 +4,41 @@
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="boilerplateModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<Schema Namespace="boilerplateModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<EntityType Name="Client">
<Key>
<PropertyRef Name="Client_Id" />
</Key>
<Property Name="Client_Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Client_Name" Type="nvarchar(max)" Nullable="false" />
<Property Name="Client_LastName" Type="nvarchar(max)" Nullable="false" />
<Property Name="Client_PhoneNumber" Type="nvarchar" MaxLength="50" Nullable="false" />
<Property Name="Client_UserName" Type="nvarchar" MaxLength="50" Nullable="false" />
<Property Name="Client_Email" Type="nvarchar" MaxLength="50" Nullable="false" />
</EntityType>
<EntityType Name="Item">
<Key>
<PropertyRef Name="Item_Id" />
</Key>
<Property Name="Item_Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Item_Title" Type="nvarchar(max)" Nullable="false" />
<Property Name="Item_Type" Type="nvarchar(max)" Nullable="false" />
</EntityType>
<EntityType Name="News">
<Key>
<PropertyRef Name="News_ID" />
</Key>
<Property Name="News_ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="News_Title" Type="nvarchar" MaxLength="100" Nullable="false" />
<Property Name="News_Description" Type="nvarchar(max)" Nullable="false" />
<Property Name="News_Summary" Type="nvarchar(max)" Nullable="false" />
<Property Name="News_Category" Type="nvarchar(max)" Nullable="false" />
<Property Name="News_Tag" Type="nvarchar(max)" Nullable="false" />
<Property Name="News_Date" Type="datetime2" Precision="7" Nullable="false" />
<Property Name="News_CreateDate" Type="datetime2" Precision="7" Nullable="false" />
<Property Name="News_EditDate" Type="datetime2" Precision="7" />
<Property Name="News_IMG" Type="nvarchar(max)" Nullable="false" />
</EntityType>
<EntityType Name="Setting">
<Key>
<PropertyRef Name="Setting_Id" />
@ -53,14 +87,57 @@
<Property Name="User_LoginDateFa" Type="nvarchar" MaxLength="50" />
</EntityType>
<EntityContainer Name="boilerplateModelStoreContainer">
<EntitySet Name="Client" EntityType="Self.Client" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Item" EntityType="Self.Item" Schema="dbo" store:Type="Tables" />
<EntitySet Name="News" EntityType="Self.News" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Setting" EntityType="Self.Setting" Schema="dbo" store:Type="Tables" />
<EntitySet Name="User" EntityType="Self.User" Schema="dbo" store:Type="Tables" />
</EntityContainer>
</Schema>
</edmx:StorageModels>
</Schema></edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema Namespace="boilerplateModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityContainer Name="boilerplateEntities" annotation:LazyLoadingEnabled="true">
<EntitySet Name="Clients" EntityType="boilerplateModel.Client" />
<EntitySet Name="Items" EntityType="boilerplateModel.Item" />
<EntitySet Name="News" EntityType="boilerplateModel.News" />
<EntitySet Name="Settings" EntityType="boilerplateModel.Setting" />
<EntitySet Name="Users" EntityType="boilerplateModel.User" />
</EntityContainer>
<EntityType Name="Client">
<Key>
<PropertyRef Name="Client_Id" />
</Key>
<Property Name="Client_Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Client_Name" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="Client_LastName" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="Client_PhoneNumber" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Client_UserName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="Client_Email" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
</EntityType>
<EntityType Name="Item">
<Key>
<PropertyRef Name="Item_Id" />
</Key>
<Property Name="Item_Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Item_Title" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="Item_Type" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
</EntityType>
<EntityType Name="News">
<Key>
<PropertyRef Name="News_ID" />
</Key>
<Property Name="News_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="News_Title" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="News_Description" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="News_Summary" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="News_Category" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="News_Tag" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="News_Date" Type="DateTime" Nullable="false" Precision="7" />
<Property Name="News_CreateDate" Type="DateTime" Nullable="false" Precision="7" />
<Property Name="News_EditDate" Type="DateTime" Precision="7" />
<Property Name="News_IMG" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
</EntityType>
<EntityType Name="Setting">
<Key>
<PropertyRef Name="Setting_Id" />
@ -94,76 +171,109 @@
<Property Name="User_Family" Type="String" MaxLength="150" FixedLength="false" Unicode="true" />
<Property Name="User_Image" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_NationalCode" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_Phone" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
<Property Name="User_Phone" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_Password" Type="String" MaxLength="150" FixedLength="false" Unicode="true" />
<Property Name="User_Code" Type="Int32" />
<Property Name="User_Token" Type="String" MaxLength="150" FixedLength="false" Unicode="true" />
<Property Name="User_Status" Type="Int32" Nullable="false" />
<Property Name="User_Role" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
<Property Name="User_Access" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
<Property Name="User_Role" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_Access" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
<Property Name="User_Email" Type="String" MaxLength="350" FixedLength="false" Unicode="true" />
<Property Name="User_Birthday" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_CreatedDate" Type="DateTime" Nullable="false" Precision="7" />
<Property Name="User_CreatedDateFa" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
<Property Name="User_CreatedDateFa" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Name="User_LoginDate" Type="DateTime" Precision="7" />
<Property Name="User_LoginDateFa" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
</EntityType>
<EntityContainer Name="boilerplateEntities" annotation:LazyLoadingEnabled="true">
<EntitySet Name="Settings" EntityType="Self.Setting" />
<EntitySet Name="Users" EntityType="Self.User" />
</EntityContainer>
</Schema>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
<edmx:Mappings>
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
<EntityContainerMapping StorageEntityContainer="boilerplateModelStoreContainer" CdmEntityContainer="boilerplateEntities">
<EntitySetMapping Name="Clients">
<EntityTypeMapping TypeName="boilerplateModel.Client">
<MappingFragment StoreEntitySet="Client">
<ScalarProperty Name="Client_Email" ColumnName="Client_Email" />
<ScalarProperty Name="Client_UserName" ColumnName="Client_UserName" />
<ScalarProperty Name="Client_PhoneNumber" ColumnName="Client_PhoneNumber" />
<ScalarProperty Name="Client_LastName" ColumnName="Client_LastName" />
<ScalarProperty Name="Client_Name" ColumnName="Client_Name" />
<ScalarProperty Name="Client_Id" ColumnName="Client_Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Items">
<EntityTypeMapping TypeName="boilerplateModel.Item">
<MappingFragment StoreEntitySet="Item">
<ScalarProperty Name="Item_Type" ColumnName="Item_Type" />
<ScalarProperty Name="Item_Title" ColumnName="Item_Title" />
<ScalarProperty Name="Item_Id" ColumnName="Item_Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="News">
<EntityTypeMapping TypeName="boilerplateModel.News">
<MappingFragment StoreEntitySet="News">
<ScalarProperty Name="News_IMG" ColumnName="News_IMG" />
<ScalarProperty Name="News_EditDate" ColumnName="News_EditDate" />
<ScalarProperty Name="News_CreateDate" ColumnName="News_CreateDate" />
<ScalarProperty Name="News_Date" ColumnName="News_Date" />
<ScalarProperty Name="News_Tag" ColumnName="News_Tag" />
<ScalarProperty Name="News_Category" ColumnName="News_Category" />
<ScalarProperty Name="News_Summary" ColumnName="News_Summary" />
<ScalarProperty Name="News_Description" ColumnName="News_Description" />
<ScalarProperty Name="News_Title" ColumnName="News_Title" />
<ScalarProperty Name="News_ID" ColumnName="News_ID" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Settings">
<EntityTypeMapping TypeName="boilerplateModel.Setting">
<MappingFragment StoreEntitySet="Setting">
<ScalarProperty Name="Setting_Id" ColumnName="Setting_Id" />
<ScalarProperty Name="Setting_Name" ColumnName="Setting_Name" />
<ScalarProperty Name="Setting_Title" ColumnName="Setting_Title" />
<ScalarProperty Name="Setting_Discount" ColumnName="Setting_Discount" />
<ScalarProperty Name="Setting_Description" ColumnName="Setting_Description" />
<ScalarProperty Name="Setting_Keywords" ColumnName="Setting_Keywords" />
<ScalarProperty Name="Setting_Header" ColumnName="Setting_Header" />
<ScalarProperty Name="Setting_Footer" ColumnName="Setting_Footer" />
<ScalarProperty Name="Setting_Social" ColumnName="Setting_Social" />
<ScalarProperty Name="Setting_Username" ColumnName="Setting_Username" />
<ScalarProperty Name="Setting_Password" ColumnName="Setting_Password" />
<ScalarProperty Name="Setting_FromNumber" ColumnName="Setting_FromNumber" />
<ScalarProperty Name="Setting_Send" ColumnName="Setting_Send" />
<ScalarProperty Name="Setting_PaternLogin" ColumnName="Setting_PaternLogin" />
<ScalarProperty Name="Setting_Service" ColumnName="Setting_Service" />
<ScalarProperty Name="Setting_Address" ColumnName="Setting_Address" />
<ScalarProperty Name="Setting_PostCode" ColumnName="Setting_PostCode" />
<ScalarProperty Name="Setting_Phone" ColumnName="Setting_Phone" />
<ScalarProperty Name="Setting_Website" ColumnName="Setting_Website" />
<ScalarProperty Name="Setting_Phone" ColumnName="Setting_Phone" />
<ScalarProperty Name="Setting_PostCode" ColumnName="Setting_PostCode" />
<ScalarProperty Name="Setting_Address" ColumnName="Setting_Address" />
<ScalarProperty Name="Setting_Service" ColumnName="Setting_Service" />
<ScalarProperty Name="Setting_PaternLogin" ColumnName="Setting_PaternLogin" />
<ScalarProperty Name="Setting_Send" ColumnName="Setting_Send" />
<ScalarProperty Name="Setting_FromNumber" ColumnName="Setting_FromNumber" />
<ScalarProperty Name="Setting_Password" ColumnName="Setting_Password" />
<ScalarProperty Name="Setting_Username" ColumnName="Setting_Username" />
<ScalarProperty Name="Setting_Social" ColumnName="Setting_Social" />
<ScalarProperty Name="Setting_Footer" ColumnName="Setting_Footer" />
<ScalarProperty Name="Setting_Header" ColumnName="Setting_Header" />
<ScalarProperty Name="Setting_Keywords" ColumnName="Setting_Keywords" />
<ScalarProperty Name="Setting_Description" ColumnName="Setting_Description" />
<ScalarProperty Name="Setting_Discount" ColumnName="Setting_Discount" />
<ScalarProperty Name="Setting_Title" ColumnName="Setting_Title" />
<ScalarProperty Name="Setting_Name" ColumnName="Setting_Name" />
<ScalarProperty Name="Setting_Id" ColumnName="Setting_Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Users">
<EntityTypeMapping TypeName="boilerplateModel.User">
<MappingFragment StoreEntitySet="User">
<ScalarProperty Name="User_Id" ColumnName="User_Id" />
<ScalarProperty Name="User_Name" ColumnName="User_Name" />
<ScalarProperty Name="User_Family" ColumnName="User_Family" />
<ScalarProperty Name="User_Image" ColumnName="User_Image" />
<ScalarProperty Name="User_NationalCode" ColumnName="User_NationalCode" />
<ScalarProperty Name="User_Phone" ColumnName="User_Phone" />
<ScalarProperty Name="User_Password" ColumnName="User_Password" />
<ScalarProperty Name="User_Code" ColumnName="User_Code" />
<ScalarProperty Name="User_Token" ColumnName="User_Token" />
<ScalarProperty Name="User_Status" ColumnName="User_Status" />
<ScalarProperty Name="User_Role" ColumnName="User_Role" />
<ScalarProperty Name="User_Access" ColumnName="User_Access" />
<ScalarProperty Name="User_Email" ColumnName="User_Email" />
<ScalarProperty Name="User_Birthday" ColumnName="User_Birthday" />
<ScalarProperty Name="User_CreatedDate" ColumnName="User_CreatedDate" />
<ScalarProperty Name="User_CreatedDateFa" ColumnName="User_CreatedDateFa" />
<ScalarProperty Name="User_LoginDate" ColumnName="User_LoginDate" />
<ScalarProperty Name="User_LoginDateFa" ColumnName="User_LoginDateFa" />
<ScalarProperty Name="User_LoginDate" ColumnName="User_LoginDate" />
<ScalarProperty Name="User_CreatedDateFa" ColumnName="User_CreatedDateFa" />
<ScalarProperty Name="User_CreatedDate" ColumnName="User_CreatedDate" />
<ScalarProperty Name="User_Birthday" ColumnName="User_Birthday" />
<ScalarProperty Name="User_Email" ColumnName="User_Email" />
<ScalarProperty Name="User_Access" ColumnName="User_Access" />
<ScalarProperty Name="User_Role" ColumnName="User_Role" />
<ScalarProperty Name="User_Status" ColumnName="User_Status" />
<ScalarProperty Name="User_Token" ColumnName="User_Token" />
<ScalarProperty Name="User_Code" ColumnName="User_Code" />
<ScalarProperty Name="User_Password" ColumnName="User_Password" />
<ScalarProperty Name="User_Phone" ColumnName="User_Phone" />
<ScalarProperty Name="User_NationalCode" ColumnName="User_NationalCode" />
<ScalarProperty Name="User_Image" ColumnName="User_Image" />
<ScalarProperty Name="User_Family" ColumnName="User_Family" />
<ScalarProperty Name="User_Name" ColumnName="User_Name" />
<ScalarProperty Name="User_Id" ColumnName="User_Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>

View File

@ -5,8 +5,11 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="da0c6095014e4dcdba4918743ea7998d" Name="Diagram1">
<EntityTypeShape EntityType="boilerplateModel.Setting" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="boilerplateModel.User" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="boilerplateModel.Client" Width="1.5" PointX="0.75" PointY="0.75" />
<EntityTypeShape EntityType="boilerplateModel.Item" Width="1.5" PointX="2.75" PointY="0.75" />
<EntityTypeShape EntityType="boilerplateModel.News" Width="1.5" PointX="8.75" PointY="0.75" />
<EntityTypeShape EntityType="boilerplateModel.Setting" Width="1.5" PointX="6.75" PointY="0.75" />
<EntityTypeShape EntityType="boilerplateModel.User" Width="1.5" PointX="4.75" PointY="0.75" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>

28
Models/News.cs Normal file
View File

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <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 boilerplate.Models
{
using System;
using System.Collections.Generic;
public partial class News
{
public int News_ID { get; set; }
public string News_Title { get; set; }
public string News_Description { get; set; }
public string News_Summary { get; set; }
public string News_Category { get; set; }
public string News_Tag { get; set; }
public System.DateTime News_Date { get; set; }
public System.DateTime News_CreateDate { get; set; }
public Nullable<System.DateTime> News_EditDate { get; set; }
public string News_IMG { get; set; }
}
}

41
Models/NewsModel.cs Normal file
View File

@ -0,0 +1,41 @@
namespace boilerplate.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
// This is the metadata class where we define display names and validation rules.
public class NewsMetadata
{
[Display(Name = "عنوان خبر")]
[Required(ErrorMessage = "لطفاً عنوان خبر را وارد کنید.")]
public string News_Title { get; set; }
[Display(Name = "توضیحات کامل")]
[AllowHtml]
[Required(ErrorMessage = "لطفاً توضیحات خبر را وارد کنید.")]
public string News_Description { get; set; }
[Display(Name = "خلاصه خبر")]
public string News_Summary { get; set; }
[Display(Name = "دسته بندی")]
public string News_Category { get; set; }
[Display(Name = "تگ‌ها")]
public string News_Tag { get; set; }
[Display(Name = "تاریخ نمایش")]
public Nullable<System.DateTime> News_Date { get; set; }
[Display(Name = "تصویر شاخص")]
public string News_IMG { get; set; }
}
[MetadataType(typeof(NewsMetadata))]
public partial class News
{
// This part remains empty.
}
}

View File

@ -6,5 +6,7 @@
public string Message { get; set; }
public string Result { get; set; }
public string FileContent { get; set; }
public string RedirectUrl { get; set; } // این خط رو به کلاس اضافه کن
}
}