https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started
https://www.entityframeworktutorial.net/efcore/install-entity-framework-core.aspx
Relation Many to One
https://learn.microsoft.com/en-us/ef/core/modeling/relationships?tabs=fluent-api%2Cfluent-api-simple-key%2Csimple-key
https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
La fonction rotation
public void
rotation(double alpha, double beta, double gamma){
const double PI = 3.14;
alpha = alpha * PI/180.;
beta = beta * PI/180.;
gamma = gamma * PI/180.;
// selon x
y = (SHORT)(cos(alpha)*y
- sin(alpha)*z);
z = (SHORT)(sin(alpha)*y
+ cos(alpha)*z);
// selon y
x =
(SHORT)(cos(beta)*x+sin(beta)*z);
z =
(SHORT)(-sin(beta)*x+cos(beta)*z);
// selon z
x = (SHORT)(cos(gamma)*x
- sin(gamma)*y);
y = (SHORT)(sin(gamma)*x
+ cos(gamma)*y);
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleObjet.metier
{
class Message
{
//internal string test;
public string contenu{get;set;}
public string afficher(){
return "Le message est " + this.contenu;
}
public string quisuisje()
{
return "je suis message";
}
}
class Email:Message
{
public string destinataire { get; set; }
public string objet { get; set; }
// masquage intentionnel
public string quisuisje()
{
return "je suis e-mail";
}
}
class Program
{
static bool verifieMessage(Message msg)
{
Console.WriteLine(msg.quisuisje());
return (msg.contenu.Length != 0);
}
static void Main(string[] args)
{
Email mail = new Email();
mail.contenu = " Hello !";
mail.destinataire = "sguerfi12@yahoo.fr";
mail.objet = "Nouvelle";
if(verifieMessage(mail))
{
Console.WriteLine(mail.quisuisje());
Console.WriteLine(mail.afficher());
}
}
}
}