PIbd-23_Firsov_KA_SUBD/Hotel/HotelMongoDB/Models/MongoService.cs
2024-05-29 17:06:07 +04:00

30 lines
695 B
C#

using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelMongoDB.Models
{
public class MongoService
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Price { get; set; } = string.Empty;
public MongoService(HotelAbstractions.Models.Service model)
{
Name = model.Name;
Price = model.Price.ToString();
}
public MongoService()
{
}
}
}