teleren/devto huggingface dataset:
Types of Entities in Entity Framework
Tags: webdev, programming, productivity, opensource
Published: 2023-05-31 09:16:03

In Entity Framework (EF), there are mainly three types of entities that are commonly used:

1. Persistent Entities: These entities represent the data model and correspond to tables in the database. They are mapped to database tables and have a one-to-one mapping with the underlying database schema. Persistent entities are typically annotated with attributes or configured using fluent API to define their mappings to database tables.

2. Complex Types: Complex types are classes that are used as properties within persistent entities. They are not mapped to their own tables in the database but rather stored as part of the parent entity's table. Complex types are used to encapsulate a group of related properties that logically belong together.

3. Enumerations (Enums): Enums are a special type of entity in EF that represent a fixed set of named values. They can be used to define properties on persistent entities that have a limited set of possible values. Enums are often used to provide more meaningful and type-safe representations for certain properties.

These three types of entities are the basic building blocks used in Entity Framework to model and interact with data in a database.

Certainly! Here are the types of entities in Entity Framework with examples:

1. Persistent Entities:
   - Person: Represents a person with properties like Id, Name, Age, etc.
   ```csharp
   public class Person
   {
       public int Id { get; set; }
       public string Name { get; set; }
       public int Age { get; set; }
   }
   ```
   
   - Product: Represents a product with properties like Id, Name, Price, etc.
   ```csharp
   public class Product
   {
       public int Id { get; set; }
       public string Name { get; set; }
       public decimal Price { get; set; }
   }
   ```

2. Complex Types:
   - Address: Represents an address with properties like Street, City, State, etc. Used as a complex type within another entity.
   ```csharp
   public class Address
   {
       public string Street { get; set; }
       public string City { get; set; }
       public string State { get; set; }
   }
   ```
   
   - OrderItem: Represents an item in an order with properties like ProductId, Quantity, Price, etc. Used as a complex type within the Order entity.
   ```csharp
   public class OrderItem
   {
       public int ProductId { get; set; }
       public int Quantity { get; set; }
       public decimal Price { get; set; }
   }
   ```

3. Enumerations (Enums):
   - Gender: Represents the gender of a person with values Male, Female, and Other.
   ```csharp
   public enum Gender
   {
       Male,
       Female,
       Other
   }
   ```
   
   - OrderStatus: Represents the status of an order with values Pending, Shipped, Delivered, etc.
   ```csharp
   public enum OrderStatus
   {
       Pending,
       Shipped,
       Delivered
   }
   ```

These are just examples to illustrate the different types of entities in Entity Framework. In practice, you would define your own entities based on your application's requirements and domain model.
What is an entity in the Entity Framework with Examples?
Tags: webdev, programming, productivity, opensource
Published: 2023-05-31 09:13:14

In the context of Entity Framework, an entity refers to a class that represents a table in a relational database. It is a fundamental concept in the Object-Relational Mapping (ORM) provided by Entity Framework, which allows developers to interact with the database using objects and their relationships, rather than writing raw SQL queries.

An entity typically corresponds to a row in a database table, and each property of the entity represents a column in that table. The relationships between entities are modeled through navigation properties, which define associations between tables.

Here's an example to illustrate the concept of entities in Entity Framework:

Let's say we have a database with two tables: "Customers" and "Orders". We can define two entity classes in our application to represent these tables:

```csharp
public class Customer
{
    public int CustomerId { get; set; }
    public string Name { get; set; }
    public ICollection<Order> Orders { get; set; }
}

public class Order
{
    public int OrderId { get; set; }
    public DateTime OrderDate { get; set; }
    public Customer Customer { get; set; }
}
```

In this example, the `Customer` class represents the "Customers" table, and the `Order` class represents the "Orders" table. Each property in these classes corresponds to a column in the respective table. The `CustomerId` property in the `Customer` class, for example, maps to the "CustomerId" column in the "Customers" table.

The `ICollection<Order> Orders` property in the `Customer` class represents a one-to-many relationship between customers and orders. It allows us to navigate from a customer to their associated orders.

By using Entity Framework, we can perform operations such as querying, inserting, updating, and deleting data in the database using these entity classes, without having to write explicit SQL statements. Entity Framework handles the mapping between the entities and the database tables, allowing us to work with objects in a more intuitive manner.

Note that this is a simplified example to illustrate the concept of entities in Entity Framework. In a real-world application, you would typically have more complex entity models with additional properties and relationships.
What is a unique mobile device id in Android phone?
Tags: ios, apple, uploader
Published: 2023-05-31 09:13:02


Create iOS Enterprise Certificate

IOS Enterprise certificate can be shelves App Store installed to the phone to use

Need a Enterprise account to apply

Create an iOS certificate first apply for an APP ID card, apply for iOS certificate file. Mobileprovision need to choose, as well as in itunesconnect. New app also need.

Appuploader home -- A tool improve ios develop efficiency such as submit ipa to appstore and manage ios certificate
Develop without $99 payment $99 payment is not necessary If you just wanna develop and test ios app --not include push ,payment function-- on your device. Plist Editor Include a small tool to view and edit .plist file Meta data batch Upload You can upload ipa description,screenshot,keyword,localization ,iap in batches, putting all those in a excel file Android Certificate Create A small tool create Android develop certificate Test device UDID manage Add ,enable ,disable test device udid in appuploader App bundle id manage Manage and view App bundle id，add and create are supported
http://www.appuploader.net/
一、 iOS Enterprise certificate application（.p12）

IOS certificate application here to use a tool Appuploader, you can quickly create. P12 and .mobileprovision iOS certificate file.

IOS证书制作教程
这个密码不是账号密码，而是一个保护证书的密码，是p12文件的密码，此密码设置后没有其他地方可以找到，忘记了只能删除证书重新制作，所以请务必记住密码。还有为了安全起见，密码不要太简单。 证书名称是你为了在证书列表里面便于区别的一个字符，自己好辨识就可以，尽量是是字母和数字之类 带distribution的是发布类型，带development的是开发类型。 apple类型=ios+mac，所以开发时选择ios app development和apple development 类型都是可以的 只有部分类型的证书需要选择bundle id，例如推送证书。因为大部分证书是不和app关联的。而是通过描述文件profile文件关联app。 如果期望制作好证书后在其他电脑上同样可以下载到这个证书，或者和你同事同步此证书，则需要勾选使用appuploader服务同步。否则您需要手动管理p12文件在不同电脑之间的传输，并且一但创建下载后，无法在其他电脑下载，只能手动复制文件过去。一般情况下，推荐使用appuploader服务同步。 IOS开发选择apple development或者ios app development 类型 ios 发布选择 apple distribution或者 ios distribution （app store and ad hoc） 开发推送证书选择 apple push notification service ssl (sandbox) 发布推送证书选择 apple push notification service ssl (sandbox & production) 其他证书不是很常用，可以自行百度各种证书说明
http://kxdang.com/topic/appuploader/certification.html
1, Login Appuploader Select Certification

2, select the iOS business release certificate, enter the certificate name, mailbox, password click ok to create

3, click P12 to download and save the certificate file

二、iOS business description file application （.mobileprovision）

Advertisements

REPORT THIS AD

1, back to the software click Profiles

2, select the iOS business release description file, select appid, associated with iOS enterprise release certificate, enter the certificate name, click ok to create.

3, click Download to save the iOS business description file to the computer
Context Class in Entity Framework
Tags: webdev, programming, aspdotnet, opensource
Published: 2023-05-31 09:04:39

In Entity Framework, a context class represents a database session and acts as a bridge between your application and the underlying database. It is responsible for managing the connection and providing a set of methods to interact with the database.

The context class is derived from the DbContext base class provided by Entity Framework. It serves as a container for all the entity sets (DbSet<T>) representing the tables or collections in the database.

Typically, you create a context class that inherits from DbContext and define properties for each entity set you want to interact with. These entity sets represent tables or collections in your database, and Entity Framework uses them to generate SQL queries and perform CRUD operations.

Here's an example of a context class in Entity Framework:

```csharp
using Microsoft.EntityFrameworkCore;

public class MyDbContext : DbContext
{
    public DbSet<Customer> Customers { get; set; }
    public DbSet<Order> Orders { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        // Configure the database provider and connection string
        optionsBuilder.UseSqlServer("YourConnectionString");
    }
}
```

In this example, the `MyDbContext` class inherits from `DbContext` and defines two properties: `Customers` and `Orders`. These properties represent the entity sets that map to the "Customers" and "Orders" tables in the database.

The `OnConfiguring` method is overridden to specify the database provider and connection string. In this case, it's using SQL Server with a connection string named "YourConnectionString."

Once you have defined the context class, you can use it to query, insert, update, and delete data in the database using Entity Framework's LINQ (Language Integrated Query) syntax. You can also use it to configure various aspects of the database, such as defining relationships between entities, specifying indexes, and more.

The context class in Entity Framework plays a vital role in managing the connection and providing an interface to interact with the database using entity classes.
How to update browserless/chrome Docker image
Tags: testing, webdev, docker
Published: 2023-05-31 08:56:01

> # TL;DR: to update you **remove the image and the container using it**.

---

It looks like it is hard to find an answer to the particular question in the title especially if you are a person like me who uses Docker rarely.

## The steps

```bash
$ docker images

REPOSITORY           TAG       IMAGE ID       CREATED         SIZE
browserless/chrome   latest    240fb1d898bf   17 hours ago    3.84GB

$ docker image rm 240fb1d898bf

Error response from daemon: conflict: unable to delete 240fb1d898bf (cannot be forced) - image is being used by running container 89211e1df4eb

$ docker container rm 89211e1df4eb

$ docker image rm 240fb1d898bf
```

Of course make sure you do turn off the container as well. Trying to remove the image lists the relevant container ID which you might be missing from the list when you do `docker container ls` when it is not running.

After this you can do the usual `docker compose up -d` and new browserless/chrome will be installed.

Very handy as the latest version out of the door just broke all the existing visual regression test image snapshots.
Blocking commits on main with the pre-commit hook
Tags: git
Published: 2023-05-31 08:51:43

---
title: Blocking commits on main with the pre-commit hook
author: ''
published: true
publishDate: Wed May 31 2023
displayDate: 31 May
cover: 'https://i.ibb.co/swkd4P2/ccc.jpg'
description: Blocking commits on main with the pre-commit hook
tags:
  - git
id: 1486756
date: '2023-05-31T08:51:43Z'
---

## Blocking commits on main with the pre-commit hook

While you can edit the settings on github to block commits on main, it's also possible to do it locally so you can prevent it from happening in the first place by using the pre-commit hook.

```bash
# ~/.config/git/hooks/pre-commit
branch="$(git branch --show-current)"
commits="$(git rev-list --all)"

if [ "$branch" = "main" ] && [ "$commits" != "" ]; then
  echo "Commit on main branch is blocked, there are already existing commits."
  exit 1
fi
```

Any newly created repo will automatically have this hook in place. If you want to add it to an existing repo, you can copy the file to the `.git/hooks` directory. Typically in a newly created repo we will want the initial commit to be on main, so the hook also checks there are any existing commits before blocking the commit.

```bash
☁  brew@kelso:asda ➜ (main) ✗ git add README.md
☁  brew@kelso:asda ➜ (main) ✗ git commit -m "adding initial documentation"
main branch commit is blocked
```
Màn hình Android Zestech - manhinhzestech.vn
Published: 2023-05-31 08:48:28




✪ Hình thức liên hệ Phụ kiện Xe hơi Thanh Bình Auto:

▶ Công Ty phụ kiện xe hơi Thanh bình auto

▶ Chuyên cung cấp sỉ / lẻ các phụ kiện xe hơi độc chất lượng.

– Giá cả cạnh tranh + Hàng chất lượng.

– Giao hàng tận nơi trên cả nước.

– Thanh toán khi đã nhận hàng.

– Miễn phí đổi trả các sản phẩm phụ kiện ô tô trong vòng 7 ngày.

☎ Hotline: 0962 665 345 – Kỹ Thuật 0798 74 75 76 ( Mr:Bình )

➥ Địa chỉ cty: 642 Phạm Văn Chiêu, Phường 13, Quận Gò Vấp, TP. HCM

https://manhinhzestech.vn/man-hinh/

https://manhinhzestech.vn/android-box/

✨ website: manhinhzestech.vn

✉: manhinhzestech.vn@gmail.com

✪ Số ĐKKD – MST: 0315240037 do Sở Kế hoạch Đầu tư Tp. HCM cấp ngày 29/10/2015
How can I help you ?
Tags: discuss, beginners, career, programming
Published: 2023-05-31 08:00:16

Hello dear beginners !

I want to get back to my previous love: helping you learning, make the good choices and grow as a healthy dev !

But I wonder HOW can I help you the best ?
Do you need articles ? Videos ? a newsletter with weekly tips and advices ?

Please, tell me what **you** think is the most valuable thing a 15+ XP dev/CTO/architect can do to help you !
Linux System Administration for Beginners - Full Course
Tags: linux, ubuntu, programming, developers
Published: 2023-05-31 07:45:48

This tutorial will provide you with the skills that are needed to be a Linux system administrator or Linux sysadmin. Learn about client-side system administration, and server-side system administration.

A system administrator, or sysadmin, is a person who is responsible for the upkeep, configuration, and reliable operation of computer systems; especially multi-user computers, such as servers. The system administrator seeks to ensure that the uptime, performance, resources, and security of the computers they manage meet the needs of the users, without exceeding a set budget when doing so.

⭐️ Contents ⭐
(0:00)   Linux Client Administration - Linux Installation Overview
(41:44)  Linux Client Administration - Command Line Navigation
(1:08:53)  Linux Client Administration - File Systems
(1:40:00)  Linux Client Administration - People and Permissions
(2:09:00)  Linux Client Administration - Software Repositories
(2:28:48)  Linux Client Administration - Programs and Scripts
(2:54:32)  Linux Client Administration - Services and Firewalls
(3:28:54)  Linux Client Administration - Processes and Resources
(4:07:10)  Linux Client Administration - Kernel and Hardware
(4:38:05)  Linux Client Administration - Logs and Queues
(4:59:00)  Linux Server Administration - Linux Installation Overview
(5:10:09)  Linux Server Administration - Network File System (NFS) Overview
(5:20:28)  Linux Server Administration - Samba Overview
(5:26:52)  Linux Server Administration - Apache Web Server Overview
(5:37:30)  Linux Server Administration - Database Server Overview
(5:45:03)  Linux Server Administration - Secure Shell Server Overview
(5:52:24)  Linux Server Administration - Mail Servers (Postfix) Overview
(6:04:08)  Linux Server Administration - Dynamic Host Configuration Protocol (DHCP) Overview
(06:14:12) Linux Server Administration - Domain Name System (DNS) Overview
(6:33:08)  Linux Server Administration - Simple Network Management Protocol (SNMP) Overview

{% embed https://www.youtube.com/watch?v=JnhWJbZzL58 %}
How to write a 3D text using HTML and CSS? Css 3d Text Effects
Published: 2023-05-31 07:35:32

Welcome to today’s tutorial. Today we are going to create 3D text using HTML and CSS. For this, we are going to use HTML, CSS .

 You need basic knowledge of CSS for  this project. This tutorial is well suited forCSS Beginners. Let us get started with the project.

I am sure that you have seen many 3D scene movies in or in books, also in drawings, **[3D Text effects](https://www.codewithrandom.com/2022/04/21/how-to-write-a-3d-text-using-html-and-css-css-3d-text-effects/)** are most common for us and it is very pleasing to us, so we are here today, going to make a 3D effect in text using only by HTML and CSS.

Before moving forward to the code first of all we will see the live sever of the code so you can see how it is working on clicking the button.

## HTML Code:-
HTML is the layout of the website.We have inserted a span that is a inline tag and given a class text.
```
 <!DOCTYPE html>  
 <html lang="en">  
 <head>  
   <meta charset="UTF-8">  
   <meta http-equiv="X-UA-Compatible" content="IE=edge">  
   <meta name="viewport" content="width=device-width, initial-scale=1.0">  
   <title>Document</title>  
 </head>  
 <body>  
   <span class="text">3D</span>  
 </body>  
 </html>  
```
## CSS Code:-
The box-shadow property attaches one or more shadows to an element.
```
box-shadow: h-offset v-offset blur spread color

 body {  
   background-color: #c4c4c4;  
 }  
 .text {  
   position: absolute;  
   top: 50%;   
   right: 50%;  
   transform: translate(50%,-50%);  
   text-transform: uppercase;  
   font-family: verdana;  
   font-size: 12em;  
   font-weight: 700;  
   color: #f5f5f5;  
   text-shadow: 1px 1px 1px #919191,  
     1px 2px 1px #919191,  
     1px 3px 1px #919191,  
     1px 4px 1px #919191,  
     1px 5px 1px #919191,  
     1px 6px 1px #919191,  
     1px 7px 1px #919191,  
     1px 8px 1px #919191,  
     1px 9px 1px #919191,  
     1px 10px 1px #919191,  
   1px 18px 6px rgba(16,16,16,0.4),  
   1px 22px 10px rgba(16,16,16,0.2),  
   1px 25px 35px rgba(16,16,16,0.2),  
   1px 30px 60px rgba(16,16,16,0.4);  
 }  
```
I hope you have loved **[3D Text Effect](https://www.codewithrandom.com/2022/04/21/how-to-write-a-3d-text-using-html-and-css-css-3d-text-effects/)** blog and learned many things at a place please let us know your review in the comment section if you liked it please comment below as it will give us the motivation to create more blogs.

If you faced any difficulty feel free to comment on your problems and If you really liked it, please show your love in the comment section this really motivates a blogger to provide more such content.

Written by Himanshu Singh.
How to use Meld as a difftool for Git?
Tags: meld, git, difftool, diff
Published: 2023-05-31 07:33:13

---
title: How to use Meld as a difftool for Git?
published: true
description: Often we need to visually check the difference between two branches. This is a tutorial to explain how to setup meld as a visual tool.
tags: meld, git, difftool, diff
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-31 07:09 +0000
---
Meld is a graphical tool that lets you compare and merge files or directories. You can use it as a difftool for Git to visually inspect the changes in your Git repositories. Here are the steps to set up and use Meld as a difftool for Git:

1. Check if you have Meld installed on your system by running this command in a terminal or command prompt:
   ```
   meld --version
   ```

   If you see the version information, you are good to go. Skip to step 3. If not, follow the next step to install Meld.

2. Install Meld on your system depending on your operating system:

   - For Ubuntu or Debian-based systems, run:
     ```
     sudo apt-get install meld
     ```

   - For Fedora or CentOS-based systems, run:
     ```
     sudo dnf install meld
     ```

   - For macOS systems with Homebrew, run:
     ```
     brew install meld
     ```

   - For Windows systems, download the installer from https://meldmerge.org/ and follow the instructions.

3. Create or edit your global `.gitconfig` file by running this command in a terminal or command prompt:
   ```
   git config --global --edit
   ```

   This will open the file in your default text editor.

4. Add these lines to the file to tell Git to use Meld as the difftool:
   ```
   [diff]
       tool = meld
   [difftool]
       prompt = false
   [difftool "meld"]
       cmd = meld "$LOCAL" "$REMOTE"
   ```

   These lines set Meld as the difftool and provide the command for launching it with the right file parameters. The `prompt = false` line stops Git from asking you every time if you want to use Meld or not. Don't worry, this won't affect the normal git diff command which will still work as usual.

5. Save and close the file.

6. Check that the file is updated correctly by running this command:
   ```
   git config --global --list
   ```

   You should see the configuration options you added for Meld in the list.

7. You are ready to use Meld as the difftool by running `git difftool` in your Git repositories. For example, to compare two commits, run:

    ```
    git difftool <commit> <commit>
    ```

    Git will open Meld and show you the differences between the commits for easy comparison.

You can use git difftool just like git diff. For example, to compare a file in different branches or commits, run:

    ```
    git difftool <BRANCH_NAME> file_name
    git difftool <COMMIT_HASH> file_name
    git difftool <COMMIT_HASH_1> <COMMIT_HASH_2> file_name
    ```

Meld will display the diff in a graphical interface with two panes. The order of the panes depends on the order of $LOCAL and $REMOTE in the cmd line. If you want to swap them, just change the order like this:

    cmd = meld "$REMOTE" "$LOCAL"